Hi Alexandre, On Mon, Nov 25, 2013 at 7:42 AM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Hi Eliot,
I have a question still on segmented memory.
Consider an object âc := OrderedCollection newâ. It is likely that the internal "arrayâ and the object c will be in the same generation and in the same memory segment.
There is no guarantee but it is very likely they will end up in the same segment, yes.
If I add, letâs say, 30 000 000 elements into c. After the addition the array will be very very big. Which means that it may be in a different segment memory than the one that contains âcâ. Do you feel this may be a problem? I am thinking about a long jump between c and array. Long jumps cost more than short jumps right?
I don't think it'll be an issue because statistically it'll affect a minority of collections. No, its not necessarily the case that there may be a higher cost. This depends on how the processor's memory hierarchy works. Further, performance may be more affected by how clustered the elements of the collection are than the collection itself. Do you feel there are some suboptimal situation with this situation?
I think it's way too early to worry about this kind of thing. The system needs to work and be tuned. There's plenty of time to address clustering, etc.
Alexandre
NB: I cc the mailing list to see whether other may help in understand better whatâs going on with segment and generations -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Nov 19, 2013, at 1:37 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Alexandre,
On Mon, Nov 18, 2013 at 7:40 AM, Alexandre Bergel < alexandre.bergel@me.com> wrote: Hi Eliot,
Stef told me you are working hard on improving the Pharo VM. In particular making the VM support fragmented memory. If I understand correctly, this will relieve the VM from having a continuous block of memory to hold the whole image. Really cool!
A better term is segmented memory. fragmentation in memory management means free space getting divided into too small pieces to be useful.
I have a general question regarding VM. Are you aware of other Virtual machines supporting this? Does the Java VM support fragmented memory? .Net? V8?
Any VM that uses the train algorithm supports segmented memory. Any VM that uses "pools" or "regions" uses segmented memory. VisualWorks' VM supports segments. I'm pretty sure that V8 .Net & HotSpot provide segmented memory.
I would like to mention this in a research paper I am working on.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot