+ // Single Page\r
+ if( (curEnd & 0xFFF) && (curEnd & 0xFFF) + increment < 0x1000 )\r
+ {\r
+ //if( curEnd & 0xFFF == 0 )\r
+ //{\r
+ // if( !_SysAllocate(curEnd) )\r
+ // {\r
+ // _SysDebug("sbrk - Error allocating memory");\r
+ // return (void*)-1;\r
+ // }\r
+ //}\r
+ curEnd += increment;\r
+ //_SysDebug("sbrk: RETURN %p (single page, no alloc)", (void *) oldEnd);\r
+ return (void *)oldEnd;\r
+ }\r
+\r
+ increment -= curEnd & 0xFFF;\r
+ curEnd += 0xFFF; curEnd &= ~0xFFF;\r
+ while( increment > 0 )\r
+ {\r
+ if( !_SysAllocate(curEnd) )\r
+ {\r
+ // Error?\r
+ _SysDebug("sbrk - Error allocating memory");\r
+ return (void*)-1;\r
+ }\r
+ increment -= 0x1000;\r
+ curEnd += 0x1000;\r
+ }\r
+\r
+ //_SysDebug("sbrk: RETURN %p", (void *) oldEnd);\r