memory

Memory profiler for .NET Compact Framework

Is there a tool I could use for profiling (memory) a .NET compact framework 3.5 application (Windows Mobile)? Thanks! ...

How can I configure Spring to save as much memory as possible?

We're deploying an application on a semi-embedded device that has memory constraints. Looking to save whatever we can we are analysing heap dumps of the app and attacking the biggest consumers. We use Spring 2.5 together with Spring DM 1.1 and we notice that some of our bundles with more complex Spring contexts are using up quite a bit...

Array of pairs of 3 bit elements

Because of memory constrains, I have to store some pairs of values in an array with 6 bits/pair (3 bits/value). The problem comes when I want to access this array as a normal one, based on the index of the pair. The array looks like this |--byte 0 | --byte 1 | --byte 2 |00000011 | 11112222 | 22333333 ... and so on, the pattern repe...

Memory alignment on a 32-bit Intel processor

Intel's 32-bit processors such as Pentium have 64-bit wide data bus and therefore fetch 8 bytes per access. Based on this, I'm assuming that the physical addresses that these processors emit on the address bus are always multiples of 8. Firstly, is this conclusion correct? Secondly, if it is correct, then one should align data structu...

C++ dynamic memory detail

Hi folks, I'm a c and java programmer, so memory allocation and OOP aren't anything new to me. But, I'm not sure about how exactly to avoid memory leaks with C++ implementation of objects. Namely: string s1("0123456789"); string s2 = s1.substr(0,3); s2 now has a new string object, so it must be freed via: delete &s2; Right? Moreo...

glGenTextures speed and memory concerns

I am learning OpenGL and recently discovered about glGenTextures. Although several sites explain what it does, I feel forced to wonder how it behaves in terms of speed and, particularly, memory. Exactly what should I consider when calling glGenTextures? Should I consider unloading and reloading textures for better speed? How many textur...

What sort of memory leaks should I watch for with jQuery's data()?

Should I pair every data() call with a later removeData() call? My assumptions: jQuery's remove() will remove elements from the DOM, and if I don't have any other references to remove, I don't have to do any more clean up. However, if I have some javascript var or object referring to one of the elements being removed, I'll need to clea...

memory paging with D

I'm using D/Tango for catalog indexing, is there any library to aid with memory (RAM) paging for a dictionary which is in memory and can go up to 10gb while performing indexing? ...

What is saved in a context switch?

What is exactly saved and restored in a context switch between two threads in the same process between two processes ...

Java Refuses to Start - Could not reserve enough space for object heap

Background We have a pool of aproximately 20 linux blades. Some are running Suse, some are running Redhat. ALL share NAS space which contains the following 3 folders: /NAS/app/java - a symlink that points to an installation of a Java JDK. Currently version 1.5.0_10 /NAS/app/lib - a symlink that points to a version of our applicatio...

What is the Maximum Java Heap Space for SuSE Linux

This question is related to Java Refuses To Start - Could Not Resrve Enough Space for Object Heap and should be easy enough to figure out. However; my searches haven't yielded anything useful. Essentially we have 2 32 bit OS's (RedHat & SuSE) on different machines with the same hardware. Both use the same JVM both executing the same c...

Python Memory Model

I have a very large list Suppose I do that (yeah, I know the code is very unpythonic, but for the example's sake..): n = (2**32)**2 for i in xrange(10**7) li[i] = n works fine. however: for i in xrange(10**7) li[i] = i**2 consumes a significantly larger amount of memory. I don't understand why that is - storing the big number t...

Will CFile* take large amout of memory?

I created a pool for CFile in order to prevent frequent Open and Close file operation. However I have a question about such a CFile* pool(), CMapStringToOb m_mAvailableFileObjList; If files are large, is this pool memory-consuming? My application seem to occupy large memory, I just doubt about this part, and I'm not sure. Many Thank...

Does CLR release memory from COM objects?

I am working on an Outlook Addin where I create a lot of COM objects(Outlook mail, Outlook folder etc). My understanding is that since these objects are COM objects,CLR won't release memory from these objects and i'll have to take care of releasing memory from these objects.So to release memory from these object I use Marshal.ReleaseCo...

Aligned and unaligned memory accesses?

What is the difference between aligned and unaligned memory access? I work on an TMS320C64x DSP, and I want to use the intrinsic functions (C functions for assembly instructions) and it has ushort & _amem2(void *ptr); ushort & _mem2(void *ptr); , where _amem2 does an aligned access of 2bytes and _mem2 does unaligned access. When sh...

JS 1-2k variables make page load slow

On one page of my website the user has the ability to choose and remove up to 2000 items through selecting multiple string representations of them in a dropdown list. On page load, the objects are loaded onto the page from a previous session into 7 different drop-down lists. In the window.onload event, the function looping through the ...

How can I make system calls invoke my SIGSEGV handler when given protected memory?

I'm working on a memory tracking library where we use mprotect to remove access to most of a program's memory and a SIGSEGV handler to restore access to individual pages as the program touches them. This works great most of the time. My problem is that when the program invokes a system call (say read) with memory that my library has mar...

const/readonly vs. programs like Cheat Engine

I have a program, and in that program there is some variables (username and "privilege-level") that are only changed when the user logs on. Is there a way to "secure" these varaibles from memory-editing etc while the program runs, but the program is still able to change them if the user logs on with an other username. I thought it would...

Practicing buffer overflow attack in Ubuntu

I am trying to learn to use buffer overflow attack in Ubuntu. Unfortunately, I cannot turn off Address Space Layout Randomization (ASLR) feature in this OS, which is turned on by default. I have tried some work around found in some fedora books: echo "0" > /proc/sys/kernel/randomize_va_space but for some reason the protection's still ...

How can I monitor memory usage of php in linux?

Hi, I have used valgrinds massif tool to monitor memory usage in the past. Does anyone know how to capture memory use of php processes that are spawned on a linux lighttpd server? I have found that Valgrind can not attach to a prerunning process (and I would not know the PID of the php process before hand anyway) I only see lighttpd...