From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f180.google.com ([209.85.215.180]) by ewsd; Sat Nov 21 14:56:32 -0500 2020 Received: by mail-pg1-f180.google.com with SMTP id v21so10486819pgi.2 for <9front@9front.org>; Sat, 21 Nov 2020 11:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=offblast-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=fjnzTs7hT3dG0LuthtMnaAmP3WAkyEXIF9v3JdQhnOY=; b=RR6y21fJ1Uh+8+zoM0ADsCxigrSFdnsKorXsUc0fiR+9pIXUWZVpcE8FH4dA+PtO6N g5sDlMzU61QHteW5DUP6AyHo+upPzQ9juxdTSryuTJ1M1s97HttqAZn+gKOk2xvqqQZd gPujwsTZeXDMGLeHrq06JoXXcz23/BtP7Id9d4+D/W7YjviypI4QjkQAfioOXTKpZdgz NPl0tIX25cH5gsDJ86CbK1+9wA0qu2268wRpl6WDD7t4bxILCPUWiX5XU2euwVlja5oT qlSFq0cF5XqkKD2HOJtOyqnL3eSTufNxRCoaWsAnkRK7Uy4e9m/U7++WrPTeNIpkXy12 p/gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=fjnzTs7hT3dG0LuthtMnaAmP3WAkyEXIF9v3JdQhnOY=; b=byC7jg9c5LoNxMTbGaJf1ujp6JaTG1Wn8yDarUWAelQN00qJqSwyxaPue+Idu/k3fa rM4yRy3uTYofOS68xiTEOm0J/ZkOAd/xvOL2PARmtM2i4HfFHcKsb8avKuzjvHeqiFb8 u4mYPeoRSNuH8jE1Q6fN2ILAJxkeryf5Lz3LLfumveLwZwJ3S80ptD43CysNe5Nofol+ ED4YBEnS+NR7ysvyG1ZmmGycKaKoXeyujRhaxWsRh+qrzgNI+FibY+UX/MDwYf5HCVJz SF9saXUYdCOEYWeo4Fqqab/OgKguFeuRaDr+mBB+CVa/W0oCwTdavhLhB53aRjwyUHDp UHUw== X-Gm-Message-State: AOAM531csahKlu88sAdJ7NdWepNnpvVF7+4hWfP5UmHzYcR7CTNyEgh1 yaFQssbo+5oHCXkVbLthLhHaFKxnId3ufKBs X-Google-Smtp-Source: ABdhPJxEA6JuH+Mof/ntBCnMrhpwnBHNkKkfa6tA4ZbOGEQWyt3Z1vF8M14jfsUH4/nF5LgHhoVWbA== X-Received: by 2002:a65:5588:: with SMTP id j8mr21542435pgs.245.1605988585282; Sat, 21 Nov 2020 11:56:25 -0800 (PST) Return-Path: Received: from wololo.home.arpa ([2601:646:100:8cb:2c6d:f3ff:fe32:a632]) by smtp.gmail.com with ESMTPSA id n68sm7535708pfn.161.2020.11.21.11.56.24 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2020 11:56:24 -0800 (PST) Date: Sat, 21 Nov 2020 11:56:22 -0800 From: Nick Owens To: 9front@9front.org Subject: Re: [9front] Bounty: OCaml 4.11.1 Message-ID: <20201121195622.sn675gq4lozvmepa@wololo.home.arpa> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: basic strategy dependency-scale rails app template-based extension On Fri, Nov 20, 2020 at 11:24:01PM -0700, McKay Marston wrote: > > > > On Nov 20, 2020, at 10:46 PM, ori@eigenstate.org wrote: > > > > Quoth McKay Marston : > >> I tried porting it myself, but it relies heavily > >> on aligned memory blocks that are generated in > >> preprocessor macros, and I gave up trying to > >> figure out how that could be done in plan9. > > > > I don't have the time to do the full port myself, > > but do you have any specific examples of > > the kind of thing that's giving trouble? > > Well, specifically this: > > runtime/caml/misc.h: > #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L > #define CAMLalign(n) _Alignas(n) > #elif defined(SUPPORTS_ALIGNED_ATTRIBUTE) > #define CAMLalign(n) __attribute__((aligned(n))) > #elif _MSC_VER >= 1500 > #define CAMLalign(n) __declspec(align(n)) > #else > #error "How do I align values on this platform?” <- this is where it bails on plan9 > #endif > > which is used by: > > runtime/caml/domain_state.h > #define DOMAIN_STATE(type, name) CAMLalign(8) type name; > #define DOMAIN_STATE(type, name) CAMLalign(8) type _##name; > > which is used by a bunch of stuff like this: > > DOMAIN_STATE(intnat, stat_compactions) > DOMAIN_STATE(intnat, stat_heap_chunks) > > And my issue is that the only way that I can see to align memory in plan9 is with mallocalign, which isn’t easily translated (by me, at least) into something that works with the “set an aligned attribute at declaration" method used here. > > If I’m missing something, though, I’d appreciate any guidance. what happens if you cheat and define it as nothing? > > — > zgasma > Mckay Marston >