Re: Is Greenspun enough?
- From: George Neuner <gneuner2/@comcast.net>
- Date: Mon, 05 Dec 2005 18:53:46 -0500
On Mon, 05 Dec 2005 18:21:37 +0100, Ulrich Hobelmann
<u.hobelmann@xxxxxx> wrote:
>George Neuner wrote:
>> On Mon, 05 Dec 2005 08:31:03 -0500, George Neuner
>> <gneuner2/@comcast.net> wrote:
>>
>>> In fact it's pretty normal to _have_ to modify the library startup
>>> functions to set up heap and so forth, but I've never seen a custom
>>> implementation of a standard library routine done for any other
>>> purpose than embedded.
>>
>> Should have added "other than alloc/free and their ilk" which are
>> reimplemented over and over by C programmers all the time.
>
>I usually only layer on top of them for convenience. But should I ever
>like a single malloc, I'd probably want to write a faster version (well,
>also layering on malloc, which I'd use to get maybe 100k blocks).
I've written several custom allocators from scratch for realtime use
on various platforms, including a cute 2 dimensional tiled allocator
for a proprietary image processor, but for desktop/server apps the
most I have ever needed to do is preallocate arrays of objects and do
ring, stack or list management on the arrays [a driver might need the
array memory to be non-pageable]. But I would only bother if the
situation could not be handled by the default language or OS
allocator(s).
>I assume a substantial fraction of memory waste (pardon, usage) and
>runtime originates from mallocing stuff, filling values in, moving them
>around, and then maybe deleting stuff again (but most programs don't
>seem to bother, be it in Java, C++, or even Aquamacs; their mem usage
>increases until I restart them once they reach 100-200 MB). The part of
>an application that actually *does* something must be a fraction.
Applications tend to monotonically increase their range of reserved
virtual addresses ... precious few ever bother to release unused pages
back to the system. Unless the application tracks and reports on its
true memory usage [e.g., logging GC], there is usually no way to tell
how much of the system reported reserved range is really in use.
George
--
for email reply remove "/" from address
.
- Follow-Ups:
- Re: Is Greenspun enough?
- From: Ulrich Hobelmann
- Re: Is Greenspun enough?
- References:
- Is Greenspun enough?
- From: Greg Menke
- Re: Is Greenspun enough?
- From: George Neuner
- Re: Is Greenspun enough?
- From: George Neuner
- Re: Is Greenspun enough?
- From: Ulrich Hobelmann
- Is Greenspun enough?
- Prev by Date: Re: OT to the extreme
- Next by Date: Koch Figures - LTK package
- Previous by thread: Re: Is Greenspun enough?
- Next by thread: Re: Is Greenspun enough?
- Index(es):
Relevant Pages
|
|