[Vm-dev] [Pharo-dev] [NB] Trying to implement a ReadStream on NBExternalAddress

Louis LaBrunda Lou at Keystone-Software.com
Wed Sep 25 22:06:32 UTC 2013

On Wed, 25 Sep 2013 12:36:53 -0700, Eliot Miranda <eliot.miranda at gmail.com>

>Talking out-of-line with someone who has lots of experience with Smalltalk memory management it came to me that the pinning primitive could (and should) take an alignment argument).  So one says e.g.

>buffer := (ByteArray new: 1024) pinWithByteAlignment: 16

In the spirit of throwing out ideas/questions to see what
sticks/helps/what-ever: would it be possible/better to do this:

buffer := ByteArray new: 1024 pinWithByteAlignment: 16.

instead of:

buffer := (ByteArray new: 1024) pinWithByteAlignment: 16.

I know it moves the pinning/alignment to the class side and that may be a
problem but it seems to me it would be better to pin/align when the objects
is created than after that when it may have to be moved.  Or am I way off
base here?

Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com

More information about the Vm-dev mailing list