object byte size
From: Jéjé (jerome.eteve_at_it-omics.com)
Date: 11/28/03
- Next message: FISH: "Re: What is the purpose of all these Streams?"
- Previous message: Alligator: "Re: Converting greek string to uppercase"
- Next in thread: Anthony Borla: "Re: object byte size"
- Reply: Anthony Borla: "Re: object byte size"
- Reply: Jesper Matthiesen: "Re: object byte size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 11:22:58 +0100
Hi everyone.
I'm currently implementing a Cache system.
Limiting its capacity with the number of object makes no sense, since
objects can have any size they want.
So I'd like to limit its capacity in term of number of bytes allready
cached. Therefore, I need to know what is the size in byte of any
object in the heap.
I thought about serializing the object to an array of byte, but this
method implies that the user is forced to make its objects serializable,
which is neither practical, nor kind to him or her.
Furthermore, serializing objects just to know their size in byte is
not efficient.
Is there a way to do this in a simple and elegant way ?
Thanks for your answers.
Jérôme.
-- -- He's just a politician trying to save both his faces... ---------------------------- jerome.eteve_at_it-omics.com
- Next message: FISH: "Re: What is the purpose of all these Streams?"
- Previous message: Alligator: "Re: Converting greek string to uppercase"
- Next in thread: Anthony Borla: "Re: object byte size"
- Reply: Anthony Borla: "Re: object byte size"
- Reply: Jesper Matthiesen: "Re: object byte size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|