Search Results

Search found 12333 results on 494 pages for 'memory leaks'.

Page 10/494 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Simulate memory warnings from the code, possible?

    - by krasnyk
    I know i can simulate a memory warning on the simulator by selecting 'Simulate Memory Warning' from the drop down menu of the iPhone Simulator. I can even make a hot key for that. But this is not what I'd like to achieve. I'd like to do that from the code by simply, lets say doing it every 5 seconds. Is that possible?

    Read the article

  • Available memory for iPhone OS app

    - by hgpc
    Is there a function or constant defining the amount of available memory for an app in iPhone OS? I'm looking for a device-independent way (iPod touch, iPhone, iPad) to know how much memory the app has left.

    Read the article

  • uiwebview memory leaks

    - by Nnp
    i am getting following memory leaks for webview initWebUILocalStorageSupport MobileQuickLookLibrary() and here is my code, i dont know what i am missing. NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10.0f]; [theRequest setHTTPMethod:@"POST"]; NSData *data = [self GenerateData]; if (data) { [theRequest setHTTPBody:data]; } [webView loadRequest:theRequest]; i hope my question is clear.thanks

    Read the article

  • Facing Memory Leaks in AES Encryption Method.

    - by Mubashar Ahmad
    Can anyone please identify is there any possible memory leaks in following code. I have tried with .Net Memory Profiler and it says "CreateEncryptor" and some other functions are leaving unmanaged memory leaks as I have confirmed this using Performance Monitors. but there are already dispose, clear, close calls are placed wherever possible please advise me accordingly. its a been urgent. public static string Encrypt(string plainText, string key) { //Set up the encryption objects byte[] encryptedBytes = null; using (AesCryptoServiceProvider acsp = GetProvider(Encoding.UTF8.GetBytes(key))) { byte[] sourceBytes = Encoding.UTF8.GetBytes(plainText); using (ICryptoTransform ictE = acsp.CreateEncryptor()) { //Set up stream to contain the encryption using (MemoryStream msS = new MemoryStream()) { //Perform the encrpytion, storing output into the stream using (CryptoStream csS = new CryptoStream(msS, ictE, CryptoStreamMode.Write)) { csS.Write(sourceBytes, 0, sourceBytes.Length); csS.FlushFinalBlock(); //sourceBytes are now encrypted as an array of secure bytes encryptedBytes = msS.ToArray(); //.ToArray() is important, don't mess with the buffer csS.Close(); } msS.Close(); } } acsp.Clear(); } //return the encrypted bytes as a BASE64 encoded string return Convert.ToBase64String(encryptedBytes); } private static AesCryptoServiceProvider GetProvider(byte[] key) { AesCryptoServiceProvider result = new AesCryptoServiceProvider(); result.BlockSize = 128; result.KeySize = 256; result.Mode = CipherMode.CBC; result.Padding = PaddingMode.PKCS7; result.GenerateIV(); result.IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; byte[] RealKey = GetKey(key, result); result.Key = RealKey; // result.IV = RealKey; return result; } private static byte[] GetKey(byte[] suggestedKey, SymmetricAlgorithm p) { byte[] kRaw = suggestedKey; List<byte> kList = new List<byte>(); for (int i = 0; i < p.LegalKeySizes[0].MaxSize; i += 8) { kList.Add(kRaw[(i / 8) % kRaw.Length]); } byte[] k = kList.ToArray(); return k; }

    Read the article

  • iPhone - database reading method and memory leaks

    - by Do8821
    Hi, in my application, a RSS reader, I get memory leaks that I can't fix because I can't understand from where they come from. Here is the code pointed out by Instruments. -(void) readArticlesFromDatabase { [self setDatabaseInfo]; sqlite3 *database; articles = [[NSMutableArray alloc] init]; if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "select * from articles"; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { while(sqlite3_step(compiledStatement) == SQLITE_ROW) { NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]; NSString *aDate = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; NSString *aUrl = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)]; NSString *aCategory = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 4)]; NSString *aAuthor = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 5)]; NSString *aSummary = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 6)]; NSMutableString *aContent = [NSMutableString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 7)]; NSString *aNbrComments = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 8)]; NSString *aCommentsLink = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 9)]; NSString *aPermalink = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 11)]; [aContent replaceCharactersInRange: [aContent rangeOfString: @"http://www.mywebsite.com/img/action-on.gif"] withString: @"hellocoton-action-on.gif"]; [aContent replaceCharactersInRange: [aContent rangeOfString: @"hhttp://www.mywebsite.com/img/action-on-h.gif"] withString: @"hellocoton-action-on-h.gif"]; [aContent replaceCharactersInRange: [aContent rangeOfString: @"hthttp://www.mywebsite.com/img/hellocoton.gif"] withString: @"hellocoton-hellocoton.gif"]; NSString *imageURLBrut = [self parseArticleForImages:aContent]; NSString *imageURLCache = [imageURLBrut stringByReplacingOccurrencesOfString:@":" withString:@"_"]; imageURLCache = [imageURLCache stringByReplacingOccurrencesOfString:@"/" withString:@"_"]; imageURLCache = [imageURLCache stringByReplacingOccurrencesOfString:@" " withString:@"_"]; NSString *uniquePath = [tmp stringByAppendingPathComponent: imageURLCache]; if([[NSFileManager defaultManager] fileExistsAtPath: uniquePath]) { imageURLCache = [@"../tmp/" stringByAppendingString: imageURLCache]; [aContent replaceCharactersInRange: [aContent rangeOfString: imageURLBrut ] withString: imageURLCache]; } Article *article = [[Article alloc] initWithName:aName date:aDate url:aUrl category:aCategory author:aAuthor summary:aSummary content:aContent commentsNbr:aNbrComments commentsLink:aCommentsLink commentsRSS:@"" enclosure:aPermalink enclosure2:@"" enclosure3:@""]; [articles addObject:article]; article = nil; [article release]; } } sqlite3_finalize(compiledStatement); } sqlite3_close(database); } ` I have a lot of "Article" leaked and NSString matching with these using : [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, X)]; I tried a lot of different code I always have these leaks. Anyone has got an idea to help me?

    Read the article

  • Memory Leaks - C

    - by sbsp
    Hi guys, Is there a good application (that has some kind of gui) for testing memory leaks in c code. I would really like to test my assignment/programme but being very new to this, i struggle with using the terminal to do things, especially using gdb for debugging (to me it feels like a blast from the past, where i could be using some visual debugger). Thanks for the help

    Read the article

  • Memory not being freed, causing giant memory leak

    - by Delan Azabani
    In my Unicode library for C++, the ustring class has operator= functions set for char* values and other ustring values. When doing the simple memory leak test: #include <cstdio> #include "ucpp" main() { ustring a; for(;;)a="MEMORY"; } the memory used by the program grows uncontrollably (characteristic of a program with a big memory leak) even though I've added free() calls to both of the functions. I am unsure why this is ineffective (am I missing free() calls in other places?) This is the current library code: #include <cstdlib> #include <cstring> class ustring { int * values; long len; public: long length() { return len; } ustring() { len = 0; values = (int *) malloc(0); } ustring(const ustring &input) { len = input.len; values = (int *) malloc(sizeof(int) * len); for (long i = 0; i < len; i++) values[i] = input.values[i]; } ustring operator=(ustring input) { ustring result(input); free(values); len = input.len; values = input.values; return * this; } ustring(const char * input) { values = (int *) malloc(0); long s = 0; // s = number of parsed chars int a, b, c, d, contNeed = 0, cont = 0; for (long i = 0; input[i]; i++) if (input[i] < 0x80) { // ASCII, direct copy (00-7f) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = input[i]; } else if (input[i] < 0xc0) { // this is a continuation (80-bf) if (cont == contNeed) { // no need for continuation, use U+fffd values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } cont = cont + 1; values[s - 1] = values[s - 1] | ((input[i] & 0x3f) << ((contNeed - cont) * 6)); if (cont == contNeed) cont = contNeed = 0; } else if (input[i] < 0xc2) { // invalid byte, use U+fffd (c0-c1) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } else if (input[i] < 0xe0) { // start of 2-byte sequence (c2-df) contNeed = 1; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x1f) << 6; } else if (input[i] < 0xf0) { // start of 3-byte sequence (e0-ef) contNeed = 2; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x0f) << 12; } else if (input[i] < 0xf5) { // start of 4-byte sequence (f0-f4) contNeed = 3; values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = (input[i] & 0x07) << 18; } else { // restricted or invalid (f5-ff) values = (int *) realloc(values, sizeof(int) * ++s); values[s - 1] = 0xfffd; } len = s; } ustring operator=(const char * input) { ustring result(input); free(values); len = result.len; values = result.values; return * this; } ustring operator+(ustring input) { ustring result; result.len = len + input.len; result.values = (int *) malloc(sizeof(int) * result.len); for (long i = 0; i < len; i++) result.values[i] = values[i]; for (long i = 0; i < input.len; i++) result.values[i + len] = input.values[i]; return result; } ustring operator[](long index) { ustring result; result.len = 1; result.values = (int *) malloc(sizeof(int)); result.values[0] = values[index]; return result; } operator char * () { return this -> encode(); } char * encode() { char * r = (char *) malloc(0); long s = 0; for (long i = 0; i < len; i++) { if (values[i] < 0x80) r = (char *) realloc(r, s + 1), r[s + 0] = char(values[i]), s += 1; else if (values[i] < 0x800) r = (char *) realloc(r, s + 2), r[s + 0] = char(values[i] >> 6 | 0x60), r[s + 1] = char(values[i] & 0x3f | 0x80), s += 2; else if (values[i] < 0x10000) r = (char *) realloc(r, s + 3), r[s + 0] = char(values[i] >> 12 | 0xe0), r[s + 1] = char(values[i] >> 6 & 0x3f | 0x80), r[s + 2] = char(values[i] & 0x3f | 0x80), s += 3; else r = (char *) realloc(r, s + 4), r[s + 0] = char(values[i] >> 18 | 0xf0), r[s + 1] = char(values[i] >> 12 & 0x3f | 0x80), r[s + 2] = char(values[i] >> 6 & 0x3f | 0x80), r[s + 3] = char(values[i] & 0x3f | 0x80), s += 4; } return r; } };

    Read the article

  • How to prevent latex memory overflow

    - by drasto
    I've got a latex macro that makes small pictures. In that picture I need to draw area. Borders of that area are quadratic bezier curves and that area is to be filled. I did not know how to do it so currently I'm "filling" the area by drawing a plenty of bezier curves inside it... This slows down typeseting and when a macro is used multiple times (so tex is drawing really a lot of quadratic bezier curves) it produces following error: ! TeX capacity exceeded, sorry [main memory size=3000000]. How can I prevent this error ? (by freeing memory after macro or such...) Or even better how do I fill the area determined by two quadratic bezier curves? Code that produces error: \usepackage{forloop} \usepackage{picture} \usepackage{eepic} ... \linethickness{\lineThickness\unitlength}% \forloop[\lineThickness]{cy}{\cymin}{\value{cy} < \cymax}{% \qbezier(\ax, \ay)(\cx, \value{cy})(\bx, \by)% }% Here are some example values for variables: \setlength{\unitlength}{0.01pt} \lineThickness=20 %cy is just a counter - inital value is not important \cymin=450 \cymax=900 %from following only the difference between \ax and \bx is important \ax=0 \ay=0 \bx=550 \by=0 Note: To reproduce the error this code have to execute approximately 150 times (could be more depending on your latex memory settings). Thanks a lot for any help

    Read the article

  • NSXMLParser & memory leaks

    - by HBR
    Hi, I am parsing an XML file using a custom class that instanciates & uses NSXMLParser. On the first call everything is fine but on the second, third and later calls Instruments show tens of memory leaks on certain lines inside didEndElement, didEndElement and foundCharacters functions. I googled it and found some people having this issue, but I didn't find anything that could really help me. My Parser class looks like this : Parser.h @interface XMLParser : NSObject { NSMutableArray *data; NSMutableString *currentValue; NSArray *xml; NSMutableArray *videos; NSMutableArray *photos; NSXMLParser *parser; NSURLConnection *feedConnection; NSMutableData *downloadedData; Content *content; Video *video; BOOL nowPhoto; BOOL nowVideo; BOOL finished; BOOL webTV; } -(void)parseXML:(NSURL*)xmlURL; -(int)getCount; -(NSArray*)getData; //- (void)handleError:(NSError *)error; //@property(nonatomic, retain) NSMutableString *currentValue; @property(nonatomic, retain) NSURLConnection *feedConnection; @property(nonatomic, retain) NSMutableData *downloadedData; @property(nonatomic, retain) NSArray *xml; @property(nonatomic, retain) NSXMLParser *parser; @property(nonatomic, retain) NSMutableArray *data; @property(nonatomic, retain) NSMutableArray *photos; @property(nonatomic, retain) NSMutableArray *videos; @property(nonatomic, retain) Content *content; @property(nonatomic, retain) Video *video; @property(nonatomic) BOOL finished; @property(nonatomic) BOOL nowPhoto; @property(nonatomic) BOOL nowVideo; @property(nonatomic) BOOL webTV; @end Parser.m #import "Content.h" #import "Video.h" #import "Parser.h" #import <CFNetwork/CFNetwork.h> @implementation XMLParser @synthesize xml, parser, finished, nowPhoto, nowVideo, webTV; @synthesize feedConnection, downloadedData, data, content, photos, videos, video; -(void)parseXML:(NSURL*)xmlURL { /* NSURLRequest *req = [NSURLRequest requestWithURL:xmlURL]; self.feedConnection = [[[NSURLConnection alloc] initWithRequest:req delegate:self] autorelease]; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; */ [[NSURLCache sharedURLCache] setMemoryCapacity:0]; [[NSURLCache sharedURLCache] setDiskCapacity:0]; NSXMLParser *feedParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; //NSXMLParser *feedParser = [[NSXMLParser alloc] initWithData:theXML]; [self setParser:feedParser]; [feedParser release]; [[self parser] setDelegate:self]; [[self parser] setShouldResolveExternalEntities:YES]; [[self parser] parse]; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { if ([elementName isEqualToString:@"articles"]) { self.finished = NO; self.nowPhoto = NO; self.nowVideo = NO; self.webTV = NO; if (!data) { NSMutableArray *tmp = [[NSMutableArray alloc] init]; [self setData:tmp]; [tmp release]; return ; } } if ([elementName isEqualToString:@"WebTV"]) { self.finished = NO; self.nowPhoto = NO; self.nowVideo = NO; self.webTV = YES; if (!data) { NSMutableArray *tmp = [[NSMutableArray alloc] init]; [self setData:tmp]; [tmp release]; return ; } } if ([elementName isEqualToString:@"photos"]) { if (!photos) { NSMutableArray *tmp = [[NSMutableArray alloc] init]; [self setPhotos:tmp]; [tmp release]; return; } } if ([elementName isEqualToString:@"videos"]) { if (!videos) { NSMutableArray *tmp = [[NSMutableArray alloc] init]; [self setVideos:tmp]; [tmp release]; return; } } if ([elementName isEqualToString:@"photo"]) { self.nowPhoto = YES; self.nowVideo = NO; } if ([elementName isEqualToString:@"video"]) { self.nowPhoto = NO; self.nowVideo = YES; } if ([elementName isEqualToString:@"WebTVItem"]) { if (!video) { Video *tmp = [[Video alloc] init]; [self setVideo:tmp]; [tmp release]; } NSString *videoId = [attributeDict objectForKey:@"id"]; [[self video] setVideoId:[videoId intValue]]; } if ([elementName isEqualToString:@"article"]) { if (!content) { Content *tmp = [[Content alloc] init]; [self setContent:tmp]; [tmp release]; } NSString *contentId = [attributeDict objectForKey:@"id"]; [[self content] setContentId:[contentId intValue]]; return; } if ([elementName isEqualToString:@"category"]) { NSString *categoryId = [attributeDict objectForKey:@"id"]; NSString *parentId = [attributeDict objectForKey:@"parent"]; [[self content] setCategoryId:[categoryId intValue]]; [[self content] setParentId:[parentId intValue]]; categoryId = nil; parentId = nil; return; } if ([elementName isEqualToString:@"vCategory"]) { NSString *categoryId = [attributeDict objectForKey:@"id"]; NSString *parentId = [attributeDict objectForKey:@"parent"]; [[self video] setCategoryId:[categoryId intValue]]; [[self video] setParentId:[parentId intValue]]; categoryId = nil; parentId = nil; return; } } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if (!currentValue) { currentValue = [[NSMutableString alloc] initWithCapacity:1000]; } if (currentValue != @"\n") [currentValue appendString:string]; } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { NSString *cleanValue = [currentValue stringByReplacingOccurrencesOfString:@"\n" withString:@""] ; if ([elementName isEqualToString:@"articles"]) { self.finished = YES; //[content release]; } if ([elementName isEqualToString:@"article"]) { [[self data] addObject:[self content]]; [self setContent:nil]; [self setPhotos:nil]; [self setVideos:nil]; /* [content release]; content = nil; [videos release]; videos = nil; [photos release]; photos = nil; */ } if ([elementName isEqualToString:@"WebTVItem"]) { [[self data] addObject:[self video]]; [self setVideo:nil]; //[video release]; //video = nil; } if ([elementName isEqualToString:@"title"]) { //NSLog(@"Tit: %@",cleanValue); [[self content] setTitle:cleanValue]; } if ([elementName isEqualToString:@"vTitle"]) { [[self video] setTitle:cleanValue]; } if ([elementName isEqualToString:@"link"]) { //NSURL *url = [[NSURL alloc] initWithString:cleanValue] ; [[self content] setUrl:[NSURL URLWithString:cleanValue]]; [[self content] setLink: cleanValue]; //[url release]; //url = nil; } if ([elementName isEqualToString:@"vLink"]) { [[self video] setLink:cleanValue]; [[self video] setUrl:[NSURL URLWithString:cleanValue]]; } if ([elementName isEqualToString:@"teaser"]) { NSString *tmp = [cleanValue stringByReplacingOccurrencesOfString:@"##BREAK##" withString:@"\n"]; [[self content] setTeaser:tmp]; tmp = nil; } if ([elementName isEqualToString:@"content"]) { NSString *tmp = [cleanValue stringByReplacingOccurrencesOfString:@"##BREAK##" withString:@"\n"]; [[self content] setContent:tmp]; tmp = nil; } if ([elementName isEqualToString:@"category"]) { [[self content] setCategory:cleanValue]; } if ([elementName isEqualToString:@"vCategory"]) { [[self video] setCategory:cleanValue]; } if ([elementName isEqualToString:@"date"]) { [[self content] setDate:cleanValue]; } if ([elementName isEqualToString:@"vDate"]) { [[self video] setDate:cleanValue]; } if ([elementName isEqualToString:@"thumbnail"]) { [[self content] setThumbnail:[NSURL URLWithString:cleanValue]]; [[self content] setThumbnailURL:cleanValue]; } if ([elementName isEqualToString:@"vThumbnail"]) { [[self video] setThumbnailURL:cleanValue]; [[self video] setThumbnail:[NSURL URLWithString:cleanValue]]; } if ([elementName isEqualToString:@"vDirectLink"]){ [[self video] setDirectLink: cleanValue]; } if ([elementName isEqualToString:@"preview"]){ [[self video] setPreview: cleanValue]; } if ([elementName isEqualToString:@"thumbnail_position"]){ [[self content] setThumbnailPosition: cleanValue]; } if ([elementName isEqualToString:@"url"]) { if (self.nowPhoto == YES) { [[self photos] addObject:cleanValue]; } else if (self.nowVideo == YES) { [[self videos] addObject:cleanValue]; } } if ([elementName isEqualToString:@"photos"]) { [[self content] setPhotos:[self photos]]; //[photos release]; //photos = nil; self.nowPhoto = NO; } if ([elementName isEqualToString:@"videos"]) { [[self content] setVideos:[self videos]]; //[videos release]; //videos = nil; self.nowVideo = NO; } //[cleanValue release]; //cleanValue = nil; [currentValue release]; currentValue = nil; } - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Error" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } -(NSArray*)getData { return data; } -(int)getCount { return [data count]; } - (void)dealloc { [parser release]; //[data release]; //[photos release]; //[videos release]; //[video release]; //[content release]; [currentValue release]; [super dealloc]; } @end Somewhere in my code, I create an instance of this class : XMLParser* feed = [[XMLParser alloc] init]; [self setRssParser:feed]; [feed release]; // Parse feed NSString *url = [NSString stringWithFormat:@"MyXMLURL"]; [[self rssParser] parseXML:[NSURL URLWithString:url]]; Now the problem is that after the first (which has zero leaks), instruments shows leaks in too many parts like this one (they are too much to enumerate them all, but all the calls look the same, I made the leaking line bold) : in didEndElement : if ([elementName isEqualToString:@"link"]) { // THIS LINE IS LEAKING => INSTRUMENTS SAYS IT IS A NSCFString LEAK [self content] setUrl:[NSURL URLWithString:cleanValue]]; [[self content] setLink: cleanValue]; } Any idea how to fix this pealse ? Could this be the same problem as the one mentioned (as an apple bug) by Lee Amtrong here :http://stackoverflow.com/questions/1598928/nsxmlparser-leaking

    Read the article

  • Colors in Instruments when hunting down memory leaks

    - by Structurer
    Hi I'm currently hunting down a memory leak in my app for iPhone. I'm using Instruments to track down the code that is causing the leak (becoming more and more a friend of Instruments!). Now Instruments show two lines: one in dark blue (row 146) and one in a lighter blue (150). From some trial and error I get that they are connected somehow, but not good enough at Objective-C and Memory Management yet to really understand how. Does anyone know why different colors are used and what could be my problem? I have tried to release numberForArray but the the app crashes when showing the last line in a picker view. All ideas appreciated! (Posting this I also realize that line 139 is redundant! Se there, already an improvement ;-)

    Read the article

  • Retrieve Heap memory size and its usage statistics etc...?

    - by AKN
    Lets say I open some application or process. Did some work with that. Now I closed it. Need to know whether this application caused any memory leak. i.e used up some heap memory and not cleared it properly. Can I get this statistics some how? I'm using Visual Studio (for development) under Windows OS. Even I would be interested in knowing this information for any 3rd party application.

    Read the article

  • Where to check for heap memory size and its usage statistics etc... in windows?

    - by AKN
    Lets say I open some application or process. Did some work with that. Now I closed it. Need to know whether this application caused any memory leak. i.e used up some heap memory and not cleared it properly. Can I get this statistics some how? I'm using Visual Studio (for development) under Windows OS. Even I would be interested in knowing this information for any 3rd party application.

    Read the article

  • Memory leak in Google Chrome

    - by jasondavis
    As a developer it is very common for me to have 2-3 different IDE's open, 10-15 google chrome windows which can hold up to 200 open tabs (I know I get out of hand some times), Photoshop, couple twitter bots for promo, and a few other programs but my system still runs fast and smooth. I have an i7 processor with 12gb ram. Now with all my usual stuff running my Physical memory is usually running around 50-60% however over the course of the day or much less even, I will gradually grow to 98% The highest Memory usage processes will be from Google Chrome, if I sort in the task manager by highest memory usage and end the 1 highest process which will be a google chrome one, my memory usage will jump back down to about 60%. Also by ending that 1 process, all my Chrome windows will remain open and in use, so it doesn't affect me at all by ending that process. Based on this research I am assuming that that 1 runaway process is likely the Adobe Flash as I also can say that it gets up to the 98% much faster when I am using flash items like video or music player. But even without using any of them it will still climb up to that high number eventually. Has anyone else experienced similar results?

    Read the article

  • SQL SERVER – Plan Cache and Data Cache in Memory

    - by pinaldave
    I get following question almost all the time when I go for consultations or training. I often end up providing the scripts to my clients and attendees. Instead of writing new blog post, today in this single blog post, I am going to cover both the script and going to link to original blog posts where I have mentioned about this blog post. Plan Cache in Memory USE AdventureWorks GO SELECT [text], cp.size_in_bytes, plan_handle FROM sys.dm_exec_cached_plans AS cp CROSS APPLY sys.dm_exec_sql_text(plan_handle) WHERE cp.cacheobjtype = N'Compiled Plan' ORDER BY cp.size_in_bytes DESC GO Further explanation of this script is over here: SQL SERVER – Plan Cache – Retrieve and Remove – A Simple Script Data Cache in Memory USE AdventureWorks GO SELECT COUNT(*) AS cached_pages_count, name AS BaseTableName, IndexName, IndexTypeDesc FROM sys.dm_os_buffer_descriptors AS bd INNER JOIN ( SELECT s_obj.name, s_obj.index_id, s_obj.allocation_unit_id, s_obj.OBJECT_ID, i.name IndexName, i.type_desc IndexTypeDesc FROM ( SELECT OBJECT_NAME(OBJECT_ID) AS name, index_id ,allocation_unit_id, OBJECT_ID FROM sys.allocation_units AS au INNER JOIN sys.partitions AS p ON au.container_id = p.hobt_id AND (au.TYPE = 1 OR au.TYPE = 3) UNION ALL SELECT OBJECT_NAME(OBJECT_ID) AS name, index_id, allocation_unit_id, OBJECT_ID FROM sys.allocation_units AS au INNER JOIN sys.partitions AS p ON au.container_id = p.partition_id AND au.TYPE = 2 ) AS s_obj LEFT JOIN sys.indexes i ON i.index_id = s_obj.index_id AND i.OBJECT_ID = s_obj.OBJECT_ID ) AS obj ON bd.allocation_unit_id = obj.allocation_unit_id WHERE database_id = DB_ID() GROUP BY name, index_id, IndexName, IndexTypeDesc ORDER BY cached_pages_count DESC; GO Further explanation of this script is over here: SQL SERVER – Get Query Plan Along with Query Text and Execution Count Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL Tagged: SQL Memory

    Read the article

  • Why isn't DSM for unstructured memory done today?

    - by sinned
    Ages ago, Djikstra invented IPC through mutexes which then somehow led to shared memory (SHM) in multics (which afaik had the necessary mmap first). Then computer networks came up and DSM (distributed SHM) was invented for IPC between computers. So DSM is basically a not prestructured memory region (like a SHM) that magically get's synchronized between computers without the applications programmer taking action. Implementations include Treadmarks (inofficially dead now) and CRL. But then someone thought this is not the right way to do it and invented Linda & tuplespaces. Current implementations include JavaSpaces and GigaSpaces. Here, you have to structure your data into tuples. Other ways to achieve similar effects may be the use of a relational database or a key-value-store like RIAK. Although someone might argue, I don't consider them as DSM since there is no coherent memory region where you can put data structures in as you like but have to structure your data which can be hard if it is continuous and administration like locking can not be done for hard coded parts (=tuples, ...). Why is there no DSM implementation today or am I just unable to find one?

    Read the article

  • How much of slow and fast flash memory a "flash memory" have?

    - by gsc-frank
    Trying to know what is the best of my flash memories to use ReadyBoost I realize that I don't know how much of fast flash memory each of my flash drives have. One can read: In some situations, you might not be able to use all of the memory on your device to speed up your computer. For example, some flash memory devices contain both slow and fast flash memory, but ReadyBoost can only use fast flash memory to speed up your computer. From http://windows.microsoft.com/is-IS/windows7/Using-memory-in-your-storage-device-to-speed-up-your-computer

    Read the article

  • How much of slow and fast flash memory a "flash memory" have? [migrated]

    - by gsc-frank
    Trying to know what is the best of my flash memories to use ReadyBoost I realize that I don't know how much of fast flash memory each of my flash drives have. One can read: In some situations, you might not be able to use all of the memory on your device to speed up your computer. For example, some flash memory devices contain both slow and fast flash memory, but ReadyBoost can only use fast flash memory to speed up your computer. From http://windows.microsoft.com/is-IS/windows7/Using-memory-in-your-storage-device-to-speed-up-your-computer

    Read the article

  • Windows 7 memory usage

    - by lydonchandra
    Physical memory(MB) for Windows 7 Total 4021 Cached 1113 Available 768 Free 174 Memory used 3.25GB At this point, windows7 asks me to close some programs because "system memory is low". From my understanding reading articles, I still have 768 MB free memory, why does windows7 complain? Also what does Cached memory refer to? Is this part of memory that Windows7 reserved for itself meaning it's free to use by Windows7 (and means I have about 768 + 1113 MB of free mem?)?

    Read the article

  • sysbench memory test on ec2 small instance

    - by caribio
    I'm seeing a problem with sysbench memory test (the default version that's compiled in). This is on Ubuntu Maverick, sysbench installed via apt-get install sysbench. Running the same thing on Ubuntu @ Rackspace worked just as expected. While the CPU and I/O tests worked fine on EC2 servers, the memory test just runs without doing anything (notice the 0M in the test results). The instance used was the publicly available 'stock' Ubuntu image with no changes to it: ./ec2-run-instances ami-ccf405a5 --instance-type m1.small --region us-east-1 --key mykey Supplying more arguments (such as: --memory-block-size=1K --memory-total-size=102400M) didn't help. What am I doing wrong? Thanks. sysbench --num-threads=4 --test=memory run sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 4 Doing memory operations speed test Memory block size: 1K Memory transfer size: 0M Memory operations type: write Memory scope type: global Threads started! Done. Operations performed: 0 ( 0.00 ops/sec) 0.00 MB transferred (0.00 MB/sec) Test execution summary: total time: 0.0003s total number of events: 0 total time taken by event execution: 0.0000 per-request statistics: min: 18446744073709.55ms avg: 0.00ms max: 0.00ms Threads fairness: events (avg/stddev): 0.0000/0.00 execution time (avg/stddev): 0.0000/0.00

    Read the article

  • Force Firefox 14 to free memory when opening/closing lots of popups

    - by aknghiem
    I'm currently trying to run some tests on a web application using Selenium IDE with Firefox 14. The tests mainly consist in loading a page containing thousands of links and clicking on every of those links. Of course, each time a popup shows, I tell Selenium to close it and proceed with the remaining links. However, it seems that even if I close the popups, Firefox is not freeing memory. Usually, I end up with Firefox crashing after opening 1500 popups (around 2.5Gb of memory usage). Is there any way to force the browser to free memory? Maybe something I should set in about:config? Or is there a flaw with Selenium? Thanks.

    Read the article

  • Linux released memory

    - by user59088
    If My process allocates some big memory and then deallocates, would top or gnome-system-monitor show that my memory usage of that process decreased ? or kernel will still reserve that memory for that process ? What I see is I am deallocating memory. But I still see gnome-system-monitor displaying growing memory for my program. I don't find memory leak in my end. I want to know whether its not displaying released memory ? or there is really a memory leak at my end ?

    Read the article

  • What are the advantages of registered memory?

    - by odd parity
    I'm browsing for a few low-end servers for a startup and I'm a bit confused about the different memory types. The advantage of ECC is clear - single-bit error correction. When it comes to registered memory it seems more vague, especially in systems that support both registered and unbuffered memory. A Google search mostly finds copies of the Wikipedia article, which states that registered memory chips "...place less electrical load on the memory controller and allow single systems to remain stable with more memory modules than they would have otherwise". However I can't find any quantification of this. What I'm wondering about is: Is registered memory an improvement over unbuffered when it comes to soft error rate, or is it purely about the maximum number of modules supported? If yes, at what point (amount of modules or GB of memory) do these improvements start to become noticeable? For a specific example, the HP ProLiant DL 120 G6 server manual states that maximum supported memory configuration is 16 GB unbuffered (4x4GB) or 12 GB registered (6x2GB). In this case I'd rather have the extra 4GB of memory if the reliability difference is negligible.

    Read the article

  • Memory Usage in LINUX

    - by Incredible
    I have a debian system. It has 8GB memory. When I do top it shows 7.9 GB memory used and rest free. I add up the memory usage of all the programs running from top and they hardly sum up to around 50 MB. So, where is rest of the memory being used? Can I have a better detailed info of the memory usage? What is a better way to check the memory usage?

    Read the article

  • Calculating memory footprints using /proc/sysvipc/shm

    - by MarkTeehan
    This is for a SLES 10 database server. One of my servers runs three databases and three app servers; I am analyzing how their shared memory segments grow and shrink to avoid intermittent out-of-memory scenarios. "Top" is hot helpful for this since its calculations for RES and VIRT are inconsistent. I am doing this by matching up the contents of /proc/sysvipc/shm with memory usage reported by the database admin console. I do this by totaling up saving the contents of /proc/sysvipc/shm and then total up "bytes" for all of the segments for the offending userid. This is a large server with hundreds of segments and tens (or hundreds) of GB of allocated memory per userid. However it doesn't match up - the database management software claims to be using around 25% more memory than the total I calculate. Negligible swap space is in use, so I am ignoring that. I am running it as root so I am sure I see all shared memory segments. My question is : is all (significant) allocated memory recorded in /proc/sysvipc/shm, or is this only shared memory (*and not "un-shared" memory?). If this is incorrect, what is the correct way to calculate out the total allocated memory for each userid? Also: I believe doing a 'cat' on this file locks server IPC. I check it every 5 seconds - is it likely that this frequency could be problematic? Thanks! Mark Teehan Singapore

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >