Re: HLA Lib
- From: "vid512@xxxxxxxxx" <vid512@xxxxxxxxx>
- Date: 20 Mar 2007 04:58:07 -0700
Where exactly is unmapping virtual memory quaranteed?
All memory allocation is freed up when the process quits. That's one
of the major points of using protected address spaces in the first
place. Otherwise, every program out there with a memory leak would
bring down the OS after a while.
Yes, i am aware that his usually happens. But it's not quaranteed and
shouldn't be used. Just like when you rely that "long long" is larger
than "char" in C. For example you app probably wouldn't pass MS
certification :D
Personally, I'm a bit concerned about the nine bytes of overhead that
HLA strings already consume.
Actually it's 32 bytes of overhead, plus possible 3 bytes of string
size align to 4, plus possible 8 bytes of memory block alignation :)
you know
Still it's not worth of concern. Saving data (current length of
string) is about wasting memory and speeding things up.
Personally, I'd think that a "mem.granularity( size )" function would
be the right way to go. Let the user set the granularity (to make it
easy, require that size be a power of two). Then they could set it to
whatever they want.
of course. We are just talking about default value.
Still i wonder - you care about wasting few bytes here and there, and
your (real) heap grows by 64KB blocks? :)
.
- Follow-Ups:
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- Re: HLA Lib
- References:
- HLA Lib
- From: vid512@xxxxxxxxx
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- Re: HLA Lib
- From: vid512@xxxxxxxxx
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- Re: HLA Lib
- From: vid512@xxxxxxxxx
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- Re: HLA Lib
- From: vid512@xxxxxxxxx
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- Re: HLA Lib
- From: vid512@xxxxxxxxx
- Re: HLA Lib
- From: randyhyde@xxxxxxxxxxxxx
- HLA Lib
- Prev by Date: Re: HLA Lib
- Next by Date: Re: my assembler is better than your assembler
- Previous by thread: Re: HLA Lib
- Next by thread: Re: HLA Lib
- Index(es):
Relevant Pages
|
|