From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipc 1/3: Add refcount to ipc_rcu_alloc
Date: Sun, 04 Jul 2004 01:10:47 +0200 [thread overview]
Message-ID: <40E73CF7.9050205@colorfullife.com> (raw)
In-Reply-To: <20040703154412.1d03ed41.akpm@osdl.org>
Andrew Morton wrote:
>Manfred Spraul <manfred@colorfullife.com> wrote:
>
>
>>+struct ipc_rcu_hdr
>> +{
>> + int refcount;
>> + int is_vmalloc;
>> + void *data[0];
>> +};
>>
>>
>
>That's not what I meant ;)
>
>struct ipc_rcu_hdr
>{
> int refcount;
> int is_vmalloc;
>};
>
>Then place one of these inside struct msg_queue, one inside struct
>sem_array, etc.
>
>
>
No. The size of the headers depends on the allocation size: 8 bytes for
allocs < 4088 bytes, 60 bytes for larger allocs. I don't want to expose
that implementation detail outside of util.c.
ipc_rcu_alloc allocates an arbitrary sized refcounted memory block that
is released through the rcu framework. Everything else is hidden in util.c.
--
Manfred
prev parent reply other threads:[~2004-07-03 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-03 17:35 [PATCH] ipc 1/3: Add refcount to ipc_rcu_alloc Manfred Spraul
2004-07-03 20:22 ` Andrew Morton
2004-07-03 21:52 ` Manfred Spraul
2004-07-03 22:44 ` Andrew Morton
2004-07-03 23:10 ` Manfred Spraul [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=40E73CF7.9050205@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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