9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] mallocz in APE
Date: Thu, 18 Jul 2013 11:21:02 -0400	[thread overview]
Message-ID: <809fd72c7b759ed6165ef1f95f3af11e@ladd.quanstro.net> (raw)
In-Reply-To: <f346f3d4e29d7ca9be65bf45446ed6bf@quintile.net>

On Thu Jul 18 10:49:16 EDT 2013, steve@quintile.net wrote:
> >> Having said this what about setmalloctag() getcallerpc(), etc etc.
> >
> >It is internal to the libraries and is not exposed to the APE apps, right?
>
> But because getcallerpc() is not prefexid by an underscore or file scope,
> by the "rules" it is poluting the namespace of the APE app.
>
> Its a minor thing I know but somone put a lot of effort into adding _MALLOCZ() and
> all the other internal funcs it seems a pity to not do the same with
> setmalloctag() and getcallerpc().

unfortunately the ape libmp and libsec work has gotten a bit out of sync.
i think patches have been submitted, but here's the state we're (9atom) at.  mallocz
is #defined to _MALLOCZ for internal use only.  the reason for the #define
is to avoid any additional source manipulation tricks for /sys/src/lib* source
directly compiled as ape source.

; g mallocz /sys/src/ape/lib
/sys/src/ape/lib/9/libc.h:149: #define mallocz _MALLOCZ
; nm /amd64/lib/ape/libsec.a|grep mallocz
; nm /amd64/lib/ape/libmp.a|grep mallocz
; nm /amd64/lib/ape/libauth.a|grep mallocz

getcallerpc is not defined in any header files, so it shouldn't be
a first-order issue.  (there are so many of those to chose from!)

there is no (get|set)(re)?alloctag in ape malloc, so questions about
them are moot.

- erik



      parent reply	other threads:[~2013-07-18 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18  8:49 yaroslav
2013-07-18 10:45 ` Steve Simon
2013-07-18 14:30   ` Yaroslav
2013-07-18 14:48     ` Steve Simon
2013-07-18 15:12       ` tlaronde
2013-07-18 15:21       ` erik quanstrom [this message]

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=809fd72c7b759ed6165ef1f95f3af11e@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).