[Self-interest] memory systems in Linux and Mac virtual machines
mail at russell-allen.com
mail at russell-allen.com
Wed Apr 6 05:10:00 UTC 2022
I do get an early crash when I try your code on ourself.io
Admittedly I am running the linux VM under the FreeBSD emulation layer, so it is quite possibly related to that.
Hmm, now I notice:
[Wed Apr 06 01:51:26 2022] info -- Scheduler started (according to snapshotAction schedulerInitial)
owner at russell/terminalMorph 1> memory testHeapExpansion
Self VM warning: some memory reserved by the VM has been used;
invoking emergency heap expansion...
Segmentation fault (core dumped)
That's not right! But it may not be the same issue you are seeing...
I haven't noticed much instability on a general basis but then I'm not doing anything which would use much memory.
(BTW if anyone has the time and inclination, I'd be very supportive of a proper FreeBSD port. There are also some smaller projects I could suggest for people who want to get started on the VM, for example making Self work with unix domain sockets...)
Russell
-----Original Message-----
From: "Jecel Assumpcao Jr" <jecel at merlintec.com>
Sent: Tuesday, April 5, 2022 8:59pm
To: "Self-interest" <self-interest at lists.selflanguage.org>
Subject: [Self-interest] memory systems in Linux and Mac virtual machines
A while back I wanted to show off the Self spy to illustrate a point to
a friend. To stress the memory system so it would be clear how it worked
I started by creating a small vector:
vector copySize: 1000
and then filled it in with a bunch of other vectors:
0 to: size-1 Do: [| :i | at: i Put: (vector copySize: 10)]
then at each step I doubled the size of the leaf vectors:
0 to: size-1 Do: [| :i | at: i Put:
(vector copySize: 2*(at:i) size)]
Just to keep track where we were, after each step I would evaluate
(at: 0) size
As expected, the system was forced to create a new segment by the time I
got to 2560. It crashed on the next step, though sometimes I got one
more step before it crashed. At this point the heap is only a few
megabytes in size, so this shouldn't be a problem.
This was a 2017 Linux virtual machine. Today I had the idea to try the
exact same thing on a 2017 Macintosh virtual machine. With it I was able
to get all the way up to 81920 and it didn't crash like in Linux but the
infamous colored beachball has been spinning for a couple of hours now.
Not counting object headers, this step is trying to grow the heap from
about 320MB to around twice that. The spy showed exactly what I wanted
to illustrate with the old space having grown to around 90 segments.
I had expected the behavior of both VMs to be the same, but it seems
that the Linux version it less stable. Does anyone else have a similar
experience?
-- Jecel
_______________________________________________
Self-interest mailing list
Self-interest at lists.selflanguage.org
http://lists.selflanguage.org/mailman/listinfo/self-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20220406/94b54ea8/attachment.html>
More information about the Self-interest
mailing list