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:
Andrew McCallum 1997-03-03 19:46:52 +00:00
parent af908b993e
commit c07f920c70
7 changed files with 103 additions and 42 deletions

View file

@ -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