From: john moser <bluefoxicy@linux.net>
To: linux-kernel@vger.kernel.org
Subject: krealloc()
Date: Sat, 10 Jan 2004 20:42:13 -0800 (PST) [thread overview]
Message-ID: <20040111044213.CCFAA725C@sitemail.everyone.net> (raw)
Why is there no krealloc()? I'm not sure if I should just call mmap() inside the
kernel (any security hazzards or whatnot I should be worried about there?), but
it's going to be a pain to resize arrays. realloc() is usually:
void *realloc(void *block, size_t size);
I'm thinking krealloc would be the same, since we'd have the old GFP_* flags and
the old size:
void *krealloc(void *block, size_t size);
Most realloc() implimentations grow or shrink in place, if possible. If they can't,
or if that wasn't how they were coded, they allocate the new block, memcpy() over,
then free the old block.
I have nowhere near the skill or experience needed to impliment any sort of
krealloc(), so for now I'm going to have to do bad hacks in my code. Can someone
please impliment a krealloc() by 2.6.2? Or at least slate it for SOME time in the
future, if not immediately now.
_____________________________________________________________
Linux.Net -->Open Source to everyone
Powered by Linare Corporation
http://www.linare.com/
next reply other threads:[~2004-01-11 4:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-11 4:42 john moser [this message]
2004-01-11 8:37 krealloc() Manfred Spraul
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=20040111044213.CCFAA725C@sitemail.everyone.net \
--to=bluefoxicy@linux.net \
--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
Powered by JetHome