Re: HLA Lib



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? :)

.



Relevant Pages

  • Re: Fast string operations
    ... Looping: I thought looping over arrays in managed code was "slow" ... array handling and such. ... The problem with TrimHelper is that it always returns a new string instance. ... The customer perceives this as a memory leak. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Discovering variable types...
    ... >- but I suppose MS expect us to use wrappers ... memory allocations for your variables from disk as well. ... >They most certainly are of fixed size, changing the size of a String ... >>me to keep buffer size and current postion right in the memory block. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Optimize
    ... if you use it like me to get 'the next string ptr' in addition. ... | |mov ebx eax;dw aligned strings are faster ... | Would it be enough to touch each 16th bytes in the 64K memory area ... Cache-line size is fixed, my AMD got 64 bytes per line. ...
    (alt.lang.asm)
  • Memory Question
    ... I have wrote a helper to my program which monitors object count, memory utilization and a threshold of 10% to determine how many objects are sticking around and how many are being garbage collected. ... occured right before the original String count). ... def print_threshold_breakers hsh1, hsh2, threshold ... putsf 'Building mem usage', mem_usage ...
    (comp.lang.ruby)
  • Re: Theodore Adorno, a prophet of data systems design
    ... > memory leaks, overruns etc., and I can even prove this without knowing ... possible to design a language in which buffer overruns are impossible. ... C makes the allocation of fixed-size arrays possible because there are some ... design and implement your own string model. ...
    (comp.programming)