mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Changes by wacko@power1.snu.ac.kr (Yoo C. Chung). See ChangeLog Jan 20
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
af908b993e
commit
c07f920c70
7 changed files with 103 additions and 42 deletions
|
@ -101,10 +101,13 @@ NSAllocateMemoryPages (unsigned bytes)
|
|||
#if __mach__
|
||||
kern_return_t r;
|
||||
r = vm_allocate (mach_task_self(), &where, (vm_size_t) bytes, 1);
|
||||
NSParameterAssert (r == KERN_SUCCESS);
|
||||
if (r != KERN_SUCCESS)
|
||||
return NULL;
|
||||
return where;
|
||||
#else
|
||||
where = valloc (bytes);
|
||||
if (where == NULL)
|
||||
return NULL;
|
||||
memset (where, 0, bytes);
|
||||
return where;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue