Thread overview
malloc() question
Sep 18, 2006
Robert Riebisch
Sep 20, 2006
Walter Bright
Sep 21, 2006
Robert Riebisch
Oct 04, 2006
Robert Riebisch
September 18, 2006
'size_t' is defined as 'unsigned' in, e.g., stdlib.h, but is it impossible to allocate more than 32,764 bytes at once?

I found a JGE instruction in malloc's code, but why do you a signed comparison?
September 20, 2006
Robert Riebisch wrote:
> 'size_t' is defined as 'unsigned' in, e.g., stdlib.h, but is it impossible
> to allocate more than 32,764 bytes at once?
> 
> I found a JGE instruction in malloc's code, but why do you a signed
> comparison?

Which function did you find that in? _nmalloc?
September 21, 2006
Walter Bright wrote:

> Which function did you find that in? _nmalloc?

Probably. ;-) I didn't debug the RTL, but the generated test executable. I use the small memory model (option '-ms') and the instruction was 'call near ptr _malloc'. Hope, this helps!
October 04, 2006
Robert Riebisch wrote:

> Probably. ;-) I didn't debug the RTL, but the generated test executable. I use the small memory model (option '-ms') and the instruction was 'call near ptr _malloc'. Hope, this helps!

Um, still waiting... :-(