mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Memory allocation update.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14662 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f6963c9041
commit
e25a2e2526
3 changed files with 57 additions and 16 deletions
|
@ -96,17 +96,15 @@
|
|||
#include <Foundation/NSLock.h>
|
||||
|
||||
/*
|
||||
* Try to get more memory - the normal process has failed.
|
||||
* If we can't do anything, bomb out.
|
||||
* Try to get more memory - the normal process has failed.
|
||||
* If we can't do anything, just return a null pointer.
|
||||
* Try to do some logging if possible.
|
||||
*/
|
||||
void *
|
||||
GSOutOfMemory(size_t size, BOOL retry)
|
||||
{
|
||||
/*
|
||||
* It would be nice to raise an exception - but how can we if there is
|
||||
* no memory available?
|
||||
*/
|
||||
abort();
|
||||
fprintf(stderr, "GSOutOfMemory ... wanting %u bytes.\n", size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if GS_WITH_GC == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue