Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 292 by [email protected]: Shadow memory has big footprint of
large virtual memory.
http://code.google.com/p/address-sanitizer/issues/detail?id=292
Like wiki said, shadow memory will use 1bit to map 8bit of the application
memory,
and we known, malloc only allocate the virtual memory,
real memory wont use until we actual write something.
example:
char* a = (char*)malloc(104857600);
for (int i=0; i < 1048576; i++) {
a[i] = 0;
}
If I know exactly, this code will use 100mb of virtual memory and 1.1mb of
real memory.
Now I build this code with with address sanitizer, it used 15.1mb of real
memory.
I keep changing the number in malloc and confirmed real memory increase
rate is 0.125.
I'm pretty sure memory increasingly have been used to shadow memory,
but I havn't look into code yet.
This footprint also exist with stack, if the max stack size of per thread
is 10mb,
then the footprint of per thread is 1.25mb.
Is this problem resolvable?
E.g keep shadow memory dirty or use other approach.
It maybe very hard or impossible.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.