Re: [PATCH] ipc 1/3: Add refcount to ipc_rcu_alloc
From: Manfred Spraul
Date: Sat Jul 03 2004 - 18:12:37 EST
Andrew Morton wrote:
Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/