Hi,
When memory is allocated in a function, isn't it impossible to use that memory outside the function by returning its address?
Are there exceptions? It seems the following is such an "example":
const char * f() {
return "HELLO";
}
How to explain it?
Thanks!
...
My application has just leaked 1.5GB of memory. I guess since I don't have a ton of data available to me, I'm assuming that it's leaked the memory, but it could also just be holding onto it.
I'm currently using perfmon to gather as much information as I can, to try to understand what could be causing the problem. I don't have a whole ...
Likely a dumb question but..
Are there any good guidelines for how much memory basic Java data structures will consume?
Ie: How much memory will be consumed by a simple POJO with an int member and a String member (say that holds a 10 char String)? How much memory would be consumed by a List of 10 of said objects?
etc
...
I have an application I am making that creates a large number of windows controls (buttons and labels etc). They are all being made dynamically through functions. The problem I'm having is, when I remove the controls and dispose them, they are not removed from memory.
void loadALoadOfStuff()
{
while(tabControlToClear.Controls.Count ...
Hi, I'm looking on the Linux IA-32 memory model processes see and have a simple question to it. What is there in the grey areas in the picture? Or is it just to show start and end of the memory? So, do text start at 0x0 and stack start at 0xFFFFFFFF?
Best regards, Lasse Espeholt
...
Hello,
I'm currently unpacking one of blizzard's .mpq file for reading.
For accessing the unpacked char buffer, I'm using a boost::interprocess::stream::memorybuffer.
Because .mpq files have a chunked structure always beginning with a version header (usually 12 bytes, see http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format#2...
While coding should we consider some limit on the total size of variables created on the stack? If yes, on what basis should we decide it? Is it dependent on OS, Memory Availability etc? Are there any compiler options which can check this?
Any pointers in the direction will also be helpful.
...
Hi. I am using Hashtable in my c# application. I am loading millions of key into, but after the application exceed the 3,7GB of RAM it gives me an "out of memory" exception.
I use x64 operation system, and the computer has 16GB of ram. I was thinking about maybe this could be an x86 limitation. I changed the build type to x64 but I stil...
Here's a overview of my workflow implementation:
GUI thread starts worker thread
worker thread analyzes some data
worker thread starts several other worker threads to work on subsets of
data
each of these last worker threads creates a workflow runtime and
executes a sequential workflow
Up until now, I've been creating a new WorkflowR...
My problem is not usual. Let's imagine few billions of strings. Strings are usually less then 15 characters. In this list I need to find out the number of the unique elements.
First of all, what object should I use? You shouldn't forget if I add a new element I have to check if it is already existing in the list. It is not a problem in ...
I am using an XMLParser to parse some XML data, which uses an NSMutableString *resultString to store the tag characters. At every (- parser: didStarElement...) method I allocate and init the resultString-ivar.
- (void)parser: (NSXMLParser *)parser didStartElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualified...
Hey, folks.
So, I'm running a java server (specifically Winstone: http://winstone.sourceforge.net/ )
Like this:
java -server -Xmx12288M -jar /usr/share/java/winstone-0.9.10.jar --useSavedSessions=false --webappsDir=/var/servlets --commonLibFolder=/usr/share/java
This has worked fine in the past, but now it needs to load a bunch more s...
In python I have noticed that if you do
mylist = []
for i in range(0,100000000):
mylist.append('something here to take memory')
mylist = []
it would seem the second call
mylist = []
would remove the reference and it would get collected but, as I watch them memory it does not.
when I use
del mylist[:]
it almost deletes ev...
I'm using sync framework to synchronize sql server 2008 database with sqlCE on mobile device. Everything looks fine besides some problems. One of them is:
If i want to sync 1000 or more rows, i get OutOfMemory Exception on mobile device(tho the sync completes well, because after it i check the data of some rows and it looks synced). I th...
I stumbled upon the following python weirdity:
>>> two = 2
>>> ii = 2
>>> id(two) == id(ii)
True
>>> [id(i) for i in [42,42,42,42]]
[10084276, 10084276, 10084276, 10084276]
>>> help(id)
Help on built-in function id in module __builtin__:
id(...)
id(object) -> integer
Return the identity of an object. This is guaranteed to b...
My iPhone application uses the camera to take pictures, which I suspect is somewhat memory-intensive. The app uses a custom background image for the view of its UINavigationController, and after taking a few pictures, the background goes all white. Any ideas on what I can do to stop this?
...
Hello,
we have an asp.net 3.5 application that allows users to generate many charts and export them via pdf. This works fine for smaller pdfs (less than 100 pages), but when we do larger ones, we get random errors. some of the errors we have seen are:
--System.OutOfMemoryException
--Could not render the HTML string. Could not get imag...
Hi All,
I am trying understand about the size that a Java object will be allocated with when created using a new operator.
Consider that i am creating a class
`public class NewClass {
NewClass() { }
}`
when i create an instance of NewClass using NewClass nc = new NewClass();. what is the size of the NewClass that gets created in the...
Hi,
I've got a problem on my Solaris servers. When I launch a Sun Java process with restricted memory it takes more than twice the ressources.
For example, I have 64 Go of memory on my servers. 1 is on Linux, the others are on Solaris. I ran the same softwares on all servers (only java).
When servers starts they took between 400Mb and...
I have a JVM with 12 gigs of total RAM, out of which 7 GB is allocated to the old generation.
There seems to be some memory leak, because almost the entire old gen is full, and will not release when I schedule a GC (the process is not doing anything else at that time).
A jmap -histo dump only reveals less than 1 gigabyte worth of object...