brpleshek@miavx2.ham.muohio.edu (04/11/91)
I'm creating a program that keeps track of a diver's logbook. Now My problem is that I have so much declared that TP6.0 gives me a structure too large error(#22 Used more than 65520 bytes). Now I have a 386 w/ 3 Megs of RAM and I want to use this space to make the structure larger. Will the Memory Allocation Size Command help. This is on page 416 of the User's Ref book. Will this allow me to use more memory??? If not How can I break a Program into a main and a few subprograms and link them together. I've never used TP before. I've programmed in P on a VAX where memory and structure sizes were basicily virtuall. Any and all help will be appreciated. Thanx Brian pleshek
defaria@hpcupt3.cup.hp.com (Andy DeFaria) (04/13/91)
>/ hpcupt3:comp.lang.pascal / brpleshek@miavx2.ham.muohio.edu / 11:56 am Apr 10, 1991 / >I'm creating a program that keeps track of a diver's logbook. Now My problem >is that I have so much declared that TP6.0 gives me a structure too large >error(#22 Used more than 65520 bytes). Now I have a 386 w/ 3 Megs of RAM and I >want to use this space to make the structure larger. Will the Memory >Allocation Size Command help. This is on page 416 of the User's Ref book. >Will this allow me to use more memory??? > >If not How can I break a Program into a main and a few subprograms and link >them together. I've never used TP before. I've programmed in P on a VAX where >memory and structure sizes were basicily virtuall. > >Any and all help will be appreciated. What in God's name do you have in a "diver's logbook" that is so damn huge? Ever hear of the concept of a "file"? Write some of the stuff to disk once in a while - Geeze? :-) :-). Seriously though, perhaps use of the {$M} compiler directive might help. It allows you to specify stacks sizes for data segment and heap area. Another thing by be to use more of the heap area. I think you can have a large heap but the data stack is a bit more limited (Don't have my manual handy).
hoffmann@infopls.chi.il.us (Robert Hoffmann) (04/15/91)
brpleshek@miavx2.ham.muohio.edu writes: > I'm creating a program that keeps track of a diver's logbook. Now My problem > is that I have so much declared that TP6.0 gives me a structure too large > error(#22 Used more than 65520 bytes). Now I have a 386 w/ 3 Megs of RAM and > want to use this space to make the structure larger. Will the Memory > Allocation Size Command help. This is on page 416 of the User's Ref book. > Will this allow me to use more memory??? Nope. Your problem is not total memory size, it's the size of the RECORD you declared to hold logbook info. TP (and DOS, for that matter) can't address a record larger than 64K (65,520 bytes) because of the way it addresses segmented memory (believe me, a full explanation requires a small book). What you need to do is break the RECORD structure down into two smaller ones... of course, I *am* stumped to hear that a logbook would require a RECORD size of 64K... :) Rob -------------------------------------- hoffmann@infopls.chi.il.us