I have a lot of code in an ELF shared library that is only used during library initialization (it's called from static initializers). If I put this code in its own section (or perhaps it can go in the .init section), which I can do using __attribute__((section(".mysection"))), is there a way to force this section to be paged out after t...
Suppose I have a DLL which is built with LARGEADDRESSAWARE linker flag set. Now I have an application dynamically linking to this DLL. Does this make my application LARGEADDRESSAWARE?
If not then, does it make sense to have this flag set for any DLL?
...
In a previous question I asked possible programatic ways of maximising the largest block allocatable on the LOH. I'm still seeing the problems, but now I'm trying to get my head around why the LOH seems to grow and shrink in size, yet I'm still seeing OutOfMemoryExceptions that tally with what others have reported as being due to LOH fra...
Help me settle a dispute with a coworker:
Does setting a variable or collection to null in Java aid in garbage collection and reducing memory usage? If I have a long running program and each function may be iteratively called (potentially thousands of times): Does setting all the variables in it to null before returning a value to the pa...
Hello Folks,
I know similar questions have been asked time and time again but I ask that you please bear with me as I cannot seem to find an answer that helps.
My application has leaks that are driving me out of my mind. Actually, they are not reported as leaks using Leaks, but my net bytes in ObjectAlloc goes up and up and up and neve...
Hi, is it possible to list all objects stored in heap.
I would like to do something like this:
IEnumerable<GCHandle> listOfObjectsInHeap = GetListOfObjectsFromHeap();
...
This is a statement referring to problem caused by page fault:(from Silberschatz 7th ed P-310 last para)
'We cant simply restart instructions when instruction modifies several different location
Ex:when a instruction moves 256 bytes from source to dest and either src or dest straddles on page boundary , then,after a partial move, if a ...
I have an UIWebKit with a HTML, this HTML have several images and text, but just displaying it gives me the memory warning. So I did some tests:
The same HTML with different images, fullsize, and after the same images but reduced 50% from it's original size, for the 50% reduced images, I went to preview and reduced all images in 50%
The...
I am having problem with inserting data to sqlite database.
char *update="INSERT OR REPLACE INTO ct_subject (id,id_parent, title, description, link, address, phone, pos_lat, pos_long, no_votes, avg_vote, photo, id_comerc, id_city, placement, type, timestamp, mail) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
sqlite3_stmt ...
In objective-c, I have a utility class with a bunch of static methods that I call for various tasks. As an example, I have one method that returns an NSArray that I allocate in the static method. If I set the NSArray to autorelease, then some time later, the NSArray in my calling method (that is assigned to the returned pointer) losses...
Part of this app is a "Scream" button that plays random screams from cast members of a TV show. I have to bang on the app quite a while to see a memory leak in Instruments, but it's there, occasionally coming up (every 45 seconds to 2 minutes.) The leak is 3.50kb when it occurs. Haven't been able to crack it for several hours. Any help ...
Here is my situation:
I have an event driven system, where all my handlers are derived from IHandler class, and implement an onEvent(const Event &event) method. Now, Event is a base class for all events and contains only the enumerated event type. All actual events are derived from it, including the EventKey event, which has 2 fields: (...
In several pieces of sample objective-c code I've seen people create new objects like this:
RootViewController *viewController = [[RootViewController alloc] init];
self.rootViewController = viewController; // self.rootViewController is a (nonatomic,retain) synthesized property
[viewController release];
[window addSubview: [self.rootVie...
Hello,
I have a 2 tabs application. In the first one, I'm creating objects of the "Sample" and "SampleList" entities. Each sampleList contains an ID and a set of samples. Each sample contains a date and temperature property.
In the second tab, I'm displaying my data in a tableView. I implemented the
- (void)tableView:(UITableView *)...
Hello, I have a problem with memory management.
I am developing an application that makes heavy use of UIWebView. This app generates dynamically lots of UIWebViews while loading content from my server. Some of these UIWebViews are quite large and have a lot of pictures.
If I use instruments to detect leaks, I do not detect any. However...
What does this class exactly do?
What is a "termination-triggered shutdowns"?
Where have you used this in your program or what could be a good use case for this class?
...
I want to know if a program that I am using and which requires a lot of memory is limited by the memory bandwidth.
When do you expect this to happen? Did it ever happen to you in a real life scenario?
I found several articles discussing this issue, including
http://www.cs.virginia.edu/~mccalpin/papers/bandwidth/node12.html
http://www...
I'm having some trouble with memory management in a flash app. Memory usage grows quite a bit, and I've tracked it down to the way I load assets.
I embed several raster images in a class Embedded, like this
[Embed(source="/home/gabriel/text_hard.jpg")]
public static var ASSET_text_hard_DOT_jpg : Class;
I then instance the assets this...
suppose I need to allocate and delete object on heap frequently (of arbitrary size), is there any performance benefit if instead of deleting those objects, I will return it back to some "pool" to be reused later?
would it give benefit by reduce heap allocation/deallocation?, or it will be slower compared to memory allocator performance,...
This stems from a recent couple of posts I've made on events and memory management in general. I'm making a new question as I don't think the software I'm using has anything to do with the overall problem and I'm trying to understand a little more about how to properly manage things. This is ASP.NET.
I've been trying to understand the n...