What is ‘PermSize’ in Java?

A quick definition of the “permanent generation”: “The permanent generation is used to hold reflective data of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations.” [ref] In other words, this is where class definitions … Read more

What is Sandboxed_process0 and why do i have so many instances of it listed in the memory usage for my app

When I look at my app’s memory usage on my device, there are approximately 30 entries of Sandboxed_process0 that appear under the “details” section. I was running/stopping my app from android studio quite a few times on my physical device as I was working on my app a few hours before (in case that’s relevant). … Read more

C: pointer to array of pointers to structures (allocation/deallocation issues)

Allocated Array With an allocated array it’s straightforward enough to follow. Declare your array of pointers. Each element in this array points to a struct Test: Then allocate and assign the pointers to the structures however you want. Using a loop would be simple: Then declare a pointer to this array: This allows you to … Read more

Destructor for a doubly-linked list that points to its value

You need to pair each new with exactly one delete. That is, you probably don’t want to delete prev (this node already was deleted) but you want to delete value. Well, I’d embed the value into the object and not point to it: If the value absolutely needs to be a pointer, I’d use a std::unique_ptr<int> (or, if you need to use C++ 2003, a std::auto_ptr<int>).

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

Changing the memory_limit by ini_set(‘memory_limit’, ‘-1′); is not a proper solution. Please don’t do that. Your PHP code may have a memory leak somewhere and you are telling the server to just use all the memory that it wants. You wouldn’t have fixed the problem at all. If you monitor your server, you will see that it is now probably using … Read more

Does stack grow upward or downward?

The behavior of stack (growing up or growing down) depends on the application binary interface (ABI) and how the call stack (aka activation record) is organized. Throughout its lifetime a program is bound to communicate with other programs like OS. ABI determines how a program can communicate with another program. The stack for different architectures … Read more

I get this error: “glibc detected”

Even if you’re not allocating memory directly, it happens under the hood in vector code and you most likely corrupted some portion of memory by writing where you are not supposed to. The most likely reasons I can think of are: Writing to an element that is out of bounds Using a pointer/reference to an element that … Read more