Richard R wrote: > hello, I am wondering how to calculate memory on a object which has a data > structure of 36 bytes and could have 275,000 of such structures. Do I need > to convert 36 to base 10 then multiply by 275k? then convert back to base 8?
No need to convert, when a value of "x number" of bytes is quoted, it's always given in decimal in my experience. Memory demand is usually calculated in number of bytes required, so if each structure takes 36 bytes, then 275,000 of them would take 36x275,000 bytes. Here I'm assuming by "data structure" you mean a record type and that it contains no object references or dynamic allocations of potentially varying size (which includes long/wide strings and dynamic arrays, BTW). > I want to generate a warning message if the object they load into my > software exceeds a limit on what the software can do with current memory and > page file. What platforms are you running on? For NT/XP this should never be an issue unless the hard drive is full. Stephen Posey [EMAIL PROTECTED] __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
