Message-ID: <349F11B0.60E6F3BD@usa.net> From: "Howard Jay Johnson, Jr." Organization: North Carolina State Univercity MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: more memory? References: <349DD715 DOT 8D4C6B82 AT usa DOT net> <67kr0f$ric AT bgtnsc03 DOT worldnet DOT att DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 45 Date: Tue, 23 Dec 1997 01:19:22 GMT NNTP-Posting-Host: 166.55.58.184 NNTP-Posting-Date: Mon, 22 Dec 1997 20:19:22 EST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I am parsing a text file. I scan it from the file and assign the data structure its value. I only have 1 copy at this point. Later on, I have to make a local copy(double stored then). BUT the error comes when I am in the initial parse not later when I copy the data. I can see your point, but this code dumps when I reach 1600 points(3D) and 1600 faces(3 or 4 vertices). I am not sure but it may be dumping at the malloc call. I will look into the point of failure. Email me if you want to discuss off newsgroup. USE THIS EMAIL without "MAPS" jayjohnson AT MAPSrocketmail DOT com Steve Patton wrote: > If you have everything into a datafile, and you load the datafile. It is > in memory, also if you read it from memory into a struct, you're making two > copies of it. Try and simplify things by having seperate Datafiles. Lets > say you have a simple 2D game, with a background bitmap that you have > scroll around, a 800x600 bitmap is going to take 480,000 bytes. Which > wouldn't kill you to have loaded, but if you have 10 levels, and all of > them are in one datafile, then you'd have 4 megs of RAM taken up. > > Howard Jay Johnson, Jr. wrote in article > <349DD715 DOT 8D4C6B82 AT usa DOT net>... > > Hi I am working on a 3D game/sim and I am loading objects from a data > > file. > > The game works fine but when the objects have(for example) 1600 points > > and 1600 > > faces or more, it dumps out on me. > > > > I am simply reading in data and putting it into structs. It does great > > work for > > the less complex objects. Why does djgpp and allegro run me into this > > wall and > > what is a good way around it?? > > > > checking the news and email daily. > > jayjohnson AT rocketmail DOT com > > > >