Changeset 17592

Show
Ignore:
Timestamp:
05/25/06 16:05:28 (3 years ago)
Author:
axeld
Message:

Enabled sbrk() again, but only for actual increments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/src/system/libroot/posix/unistd/sbrk.c

    r17590 r17592  
    1616sbrk(long increment) 
    1717{ 
    18 // TODO: disabled for now - let's GDB crash, so it obviously doesn't work yet 
    19 //      if (sbrk_hook) 
    20 //              return (*sbrk_hook)(increment); 
     18        // TODO: we only support extending the heap for now using this method 
     19        if (increment <= 0) 
     20                return NULL; 
     21 
     22        if (sbrk_hook) 
     23                return (*sbrk_hook)(increment); 
     24 
    2125        return NULL; 
    2226}