[Dev-C++] [Win32] Teoretical question about memory managing
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Frederico M. <the...@ho...> - 2009-07-31 23:01:23
|
Hello, Again, I seek your advice on a personal project : I have searched for information related to the impact that managing, or more accurately not managing memory, will have on processes in win32. Recently I have stumbled upon a paper disserting the effects of the paging process on windows, and the cost of requesting more resources than those currently addressed by the front-end virtual memory manager. As I envision, the final code will use a great deal of memory, and actually, it will not always be coded by me, and as such, I cannot be certain that the allocated resourced will ever be freed. I am quite the control freak, so I'm trying to implement one of two designs : a ) The software will contain one to several objects that allocate memory, at program start, based on the latest data retrieved from executions with high volume processing, or by other words, I'll subject my code to stress-tests, and register memory usage, for reserving it, on next program restart. I'll, obviously, be managing the memory, providing by one defined interface, my own allocation/freeing routines that will manage the already reserved memory(from the OS). b ) All objects within the software will, somehow ( Haven't yet figured this out ) manage its own memory, having this way some information about the memory, besides its start address and the span of it. To sum up, and finally presenting my question : which design would be better, and which would provide more information about the memory usage? The above points are, obviously, based on my belief that the system( OS, L2,L1 caches, processor, ram ) will handle better paging out/in virtual memory, than actually reserving it at a latter state, especially, at different points in program logic, since the locality is not observed, on, for instance, linked-list implementations, and processor-cycles will be 'wasted' in finding available memory in kernel/c-runtime area. Please do correct me if my assumptions are not correct, and, please advice me if you have measurable results related to such implementations... This is a pet project, and although I am pursuing it by sheer fun, I believe it can be brought to good use. Sincerely Frederico Marques _________________________________________________________________ Com o Windows Live, você pode organizar, editar e compartilhar suas fotos. http://www.microsoft.com/brasil/windows/windowslive/products/photo-gallery-edit.aspx |