9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Xiao-Yong Jin <meta.jxy@gmail.com>
To: 9front@9front.org
Cc: Adrian Siekierka <asiekierka@gmail.com>
Subject: Re: [9front] Nim lang, C alignment support
Date: Fri, 6 Aug 2021 17:25:58 -0500	[thread overview]
Message-ID: <14C92255-A517-4EBA-A944-9FBAC3B1D728@gmail.com> (raw)
In-Reply-To: <53ac86bf-b111-4d2b-afd0-088687fca7f8@posteo.net>


> On Aug 6, 2021, at 8:37 AM, Emery Hemingway <ehmry@posteo.net> wrote:
> 
> When I say garbage collector I should say memory manager, ARC and ORC
> don't work either. If you look at the generated source all Nim types
> have some alignment info attach to them, so I'd say its an unavoidable
> problem.

What exactly happens when the executables run?  Do you have the Nim
compiler bootstrapped on 9front?  Or do you just try to compile the
C code generated from other host OS?  Did you try to turn off all
the extra checks and just use malloc, like,

	-d:danger --panics:on --gc:arc -d:useMalloc

If I understand correctly, the only place that relies on the alignment
is Nim's allocator, for whatever reason, and it did not appear until
late 2019 as an optimization and safety guarantees for dynamic libraries.
If you can figure out where it actually "goes to shit", you might be
able to avoid using alignment at all.

  reply	other threads:[~2021-08-07  2:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 10:52 Emery
2021-08-06 11:11 ` Adrian Siekierka
2021-08-06 13:37   ` Emery Hemingway
2021-08-06 22:25     ` Xiao-Yong Jin [this message]
2021-08-08 14:54       ` Emery Hemingway

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14C92255-A517-4EBA-A944-9FBAC3B1D728@gmail.com \
    --to=meta.jxy@gmail.com \
    --cc=9front@9front.org \
    --cc=asiekierka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).