Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Value question (memory consumption)
Re: Value question (memory consumption) [message #29916 is a reply to message #29914] Mon, 29 November 2010 22:57 Go to previous messageGo to previous message
unknown user
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.

I've modified example to do new allocations and seems that memory get back to OS, at least here on Linux, if i don't use U++ allocator.
#include <Core/Core.h>

using namespace UPP;

#define ITEM_COUNT 1000000

CONSOLE_APP_MAIN {
	Vector<Value> v;
	getchar();
	for(int i=0;i<ITEM_COUNT;i++) v.Add((int)i);
	getchar();
	v.Clear(); v.Shrink();
	getchar();
	for(int i=0;i<ITEM_COUNT;i++) v.Add((int)i);
	getchar();
	v.Clear(); v.Shrink();
	getchar();
}


without U++ allocator:
292 KiB
38.4 MiB
30.8 MiB
38.8 MiB
420 KiB

with U++ allocator:
412 KiB
34.5 MiB (for a sec.) 70.2 MiB maybe Vector double amount of memory it need
62.5 MiB
70.2 MiB
62.5 MiB

Linux 2.6.35-23-generic #40-Ubuntu SMP Wed Nov 17 22:14:33 UTC 2010 x86_64 GNU/Linux

Andrei

[Updated on: Mon, 29 November 2010 22:58] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NEW: generic Toupel grouper
Next Topic: FIX: Value has Value, Value Type VALUE_V
Goto Forum:
  


Current Time: Sun Apr 27 22:43:10 CEST 2025

Total time taken to generate the page: 0.03584 seconds