Hi,

Am Sonntag, den 11.06.2017, 10:44 -0400 schrieb Ben Gamari:
> This is certainly one consideration. Another is that you would also
> need to teach the garbage collector to understand closures with sub-
> word-size fields. Currently we can encode whether each field of a
> closure is a pointer or not with a simple bitmap. If we naively
> allowed smaller fields we would need to increase the granularity of
> this representation to encode bytes.
> 
> Of course, one way to work around this would be to impose an
> invariant that guarantees that pointers are always word-aligned. Then
> we would probably want to shuffle sub-word sized fields, allowing two
> Word16s to inhabit a single word.

that is not an issue; we already sort field into pointers first, and
non-pointers later. So all pointers are at the beginning and nicely
aligned, and all the non-pointer data can follow in whatever weird
format. The GC only needs to know how many words in total are used by
the non-pointer data.


Greetings,
Joachim
-- 
Joachim “nomeata” Breitner
  m...@joachim-breitner.de • https://www.joachim-breitner.de/
  XMPP: nome...@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nome...@debian.org

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to