mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Changed the assertion message text shown in the requester window.
- The standard malloc() now sets errno to EINVAL for zero length allocations. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15066 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdlib_malloc.c,v 1.15 2005-11-20 17:00:22 obarthel Exp $
|
||||
* $Id: stdlib_malloc.c,v 1.16 2005-11-20 19:04:10 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -116,7 +116,10 @@ __allocate_memory(size_t size,BOOL never_free,const char * UNUSED unused_file,in
|
||||
|
||||
/* Zero length allocations are by default rejected. */
|
||||
if(size == 0)
|
||||
{
|
||||
__set_errno(EINVAL);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if(__free_memory_threshold > 0 && AvailMem(MEMF_ANY|MEMF_LARGEST) < __free_memory_threshold)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user