Date: Thu, 16 Mar 2000 06:21:07 +0500 Message-Id: <200003160121.GAA00864@midpec.com> From: Prashant TR To: "Yoda" CC: djgpp AT delorie DOT com In-reply-to: <8aot1m$93n$1@antares.worldonline.fr> (french DOT cat AT worldonline DOT com) Subject: Re: memory allocating References: <8aot1m$93n$1 AT antares DOT worldonline DOT fr> Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk "Yoda" 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.