in reply to Moving an OP and replacing it
Not all OP objects are the same size so do I have to be concerned that a 28 byte hole would have to accomodate a 56 byte op? Is there slack space built in?
Put the question in C terms. If you wanted 28 bytes to store a C struct and had an array of such structs in memory would you:
Now I don't know the real answer but I would be a little suprised if writing 56 bytes into a 28 byte hole did not overwrite the neighbouring 28 byte struct. Why have 28 and 56 byte structs if you always allocate 56 (which is what you are asking for)?
The only way I could see it working is if you replace the old object with a new object (less than or equal in size to the old) that points to a freshly allocated OP object in a free chunk of memory.
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Moving an OP and replacing it
by diotalevi (Canon) on Jun 01, 2004 at 02:59 UTC | |
by tachyon (Chancellor) on Jun 01, 2004 at 03:43 UTC |