Mail Archives: djgpp/2000/03/15/20:25:04
"Yoda" <french DOT cat AT worldonline DOT com> writes:
> When the amout of memory is too big , malloc returns a null pointer.
That's the case with any malloc. When you try to exceed the amount of memory
you have, it does return NULL.
> I'd like to know if there is other ways to allocate memory. Maybe with dpmi
> functions ? I couldnt find doc on it.
malloc uses DPMI functions to allocate memory.
> I know there r functions called like _dpmi_memory_allocate . I also saw
> allocate ldt ... But i dunno how to use them. I used to program c with
> borland Turboc , there was only malloc and xms. I couldnt load big
> objects...
There's no need to get into the DPMI functions at all. All you need to do is
to malloc the amount of space you need (there's no 640K or 1M limit when
you're working on DJGPP ;-)) and then grab the data into it.
- Raw text -