Home » U++ Library support » U++ Core » Value question (memory consumption)
Re: Value question (memory consumption) [message #29928 is a reply to message #29925] |
Tue, 30 November 2010 13:51   |
|
luzr wrote on Tue, 30 November 2010 13:21 |
andreincx wrote on Mon, 29 November 2010 16:57 | Memory consumption is higher with U++ allocator. I've tested with USEMALLOC flag and the memory consumption was half, but has same behavior, only part of the memory is released.
|
Have you tested in debug or release (Optimal)? Those numbers look quite high to me (for U++ allocator). In debug mode, U++ inserts a LOT of debugging info into the heap, so the consumption is higher.
(Will have to test myself... 
|
I tested with optimal and U++ allocator.
luzr wrote on Tue, 30 November 2010 13:25 | Yes, only "very large" (> app. 64KB) memory blocks are returned to OS. Rest is kept for later reuse. Anyway, this behaviour is pretty typical for most allocators, only maybe some of them have different threshold.
| This explains it. SetCount() allocates all in one big block so it is returned, but Add() causes allocations of 1+2+4+8+...2^16B (that is up to 64KB) which are not returned (any further are bigger than 64KB and therefore returned). That should make ~128KB of non-returned blocks and that agrees exactly with what I measured for Vector<int>. For Vector<Value> it leaves more non-returned blocks probably because there are some additional allocations when constructing the Value...
Thanks for explanation,
Honza
|
|
|
 |
|
Value question (memory consumption)
By: Factor on Mon, 29 November 2010 11:31
|
 |
|
Re: Value question (memory consumption)
|
 |
|
Re: Value question (memory consumption)
|
 |
|
Re: Value question (memory consumption)
By: unknown user on Mon, 29 November 2010 22:57
|
 |
|
Re: Value question (memory consumption)
By: mirek on Tue, 30 November 2010 13:21
|
 |
|
Re: Value question (memory consumption)
|
 |
|
Re: Value question (memory consumption)
By: mirek on Tue, 30 November 2010 14:26
|
 |
|
Re: Value question (memory consumption)
By: mirek on Tue, 30 November 2010 13:36
|
 |
|
Re: Value question (memory consumption)
By: mirek on Tue, 30 November 2010 14:46
|
 |
|
Re: Value question (memory consumption)
By: unknown user on Tue, 30 November 2010 16:48
|
 |
|
Re: Value question (memory consumption)
|
 |
|
Re: Value question (memory consumption)
By: mirek on Sat, 11 December 2010 10:38
|
 |
|
Re: Value question (memory consumption)
By: mr_ped on Tue, 30 November 2010 09:13
|
 |
|
Re: Value question (memory consumption)
By: mirek on Tue, 30 November 2010 13:25
|
Goto Forum:
Current Time: Tue Aug 26 21:16:30 CEST 2025
Total time taken to generate the page: 0.05142 seconds
|