Search Results

Search found 12267 results on 491 pages for 'out of memory'.

Page 45/491 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • memory not freed in matlab?

    - by noam
    I am running a script that animates a plot (simulation of a water flow). After a while, I kill the loop by doing ctrl-c. After doing this several times I get the error: ??? Error: Out of memory. And after I start receiving that error, every call to my script will generate it. Now, it happens before anything inside the function that I am calling is executed, i.e even if I add the line a=1 as the first line of the function I am calling, I still get the error and no printout, so the code inside the function doesn't even get executed. What could be causing this?

    Read the article

  • iphone how to remove modal uiviewcontroller from memory

    - by Scott Pendleton
    I have a root UIViewController which has a property called webView. WebView is a UIViewController with a XIB that contains a UIWebView. From my root view I modally (is there any other way?) load the webView ViewController and set its URL, always to the same page. I discovered that if, after loading the webView, I used its default Web page to navigate to another Web page, and then closed the webView and returned to the root controller -- AND THEN reopened the webView, that the webView was not showing the default page but rather the page I navigated to, which means the webView ViewController never got destroyed and removed from memory. This strikes me as very bad. So in the root ViewController, I added this code under viewWillAppear:animated -- if (self.webView != nil) { self.webView = nil) } Is that sufficient? Is there a better way?

    Read the article

  • Memory leak issue with UIImagePickerController

    - by Mustafa
    I'm getting memory leak with UIImagePickerController class. Here's how I'm using it: UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:picker animated:YES]; [picker release]; To remove the picker i call [picker dismissModalViewControllerAnimated:YES]; in didFinishPickingImage and imagePickerControllerDidCancel. -- Instruments show around 160bytes leaking as a result of this instruction: +[UIImagePickerController _loadPhotoLibraryIfNecessary] Apparently this issue has and is disturbing many people, and solution to avoid this problem is to build a singleton class dedicated for picking images from library or capturing using device's build in camera. Anyone want to add something?

    Read the article

  • Android setImageURI out of memory error

    - by Improver
    I have a very small activity that must show an image. If picture is not very small (for example 1.12 Mb 2560x1920) it produces out of memory on change screen orientation. I tried getDrawable.setCallback(null) but no luck. Where am I wrong? public class Fullscreen extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); System.gc(); setContentView(R.layout.fullscreen); ImageView imageView = (ImageView) findViewById(R.id.full_screen_image); long imageId = 2; imageView.setImageURI(Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "" + imageId)); } }

    Read the article

  • Memory leak using NSMutableArray in RootViewController called from App Delegate

    - by Lauren Quantrell
    I've written code to restore the state of my app, but there's a memory leak in the NSMutableArray. I'm new to Xcode so I apologize if this is something trivial I have overlooked. Any help is appreciated. lq AppDelegate.m - (void)applicationDidFinishLaunching:(UIApplication *)application { [rootViewController restoreState]; } RootViewController.h @interface rootViewController : UIViewController { NSMutableArray *offendingNSMutableArray; } @property (nonatomic, retain) NSMutableArray *offendingNSMutableArray; RootViewController.m @synthesize offendingNSMutableArray; - (void)restoreState { // Gets an array stored in the user defaults plist NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; self.offendingNSMutableArray = [[NSMutableArray alloc] initWithArray:[userDefaults objectForKey:kArrayValue]]; } - (void)viewDidUnload { self.offendingNSMutableArray = nil; } - (void)dealloc { [offendingNSMutableArray release]; }

    Read the article

  • free() on stack memory

    - by vidicon
    I'm supporting some c code on Solaris, and I've seen something weird at least I think it is: char new_login[64]; ... strcpy(new_login, (char *)login); ... free(new_login); My understanding is that since the variable is a local array the memory comes from the stack and does not need to be freed, and moreover since no malloc/calloc/realloc was used the behaviour is undefined. This is a real-time system so I think it is a waste of cycles. Am I missing something obvious?

    Read the article

  • Tuning OS X Virtual Memory

    - by dcolish
    I've noticed some really odd results form vm_stat on OSX 10.6. According to this, its barely hitting the cache. Searches of pretty much everywhere I could think of turn up little to explain why the rate is so low. I asked a few friends and they're seeing the same thing. What gives and how can I make it better? Mach Virtual Memory Statistics: (page size of 4096 bytes) Pages free: 78609. Pages active: 553411. Pages inactive: 191116. Pages speculative: 6198. Pages wired down: 153998. "Translation faults": 116031508. Pages copy-on-write: 2274338. Pages zero filled: 33360804. Pages reactivated: 264378. Pageins: 1197683. Pageouts: 43756. Object cache: 20 hits of 1550639 lookups (0% hit rate)

    Read the article

  • SQL Server 2005 Error 701 - out of memory

    - by Tufo
    I'm currently having following error message when executing a .sql file with about 26MB on SQL Server 2005: Msg 701, Level 17, State 123 There is insufficient system memory to run this query. I'm working with 4GB RAM, 64Bit Windows 7 Ultimate, Core2Duo T6400(2GHz)... Is there a way to execute it without receiving this message (maybe force SQL Server to use swap file?) or a way to execute it in parts (like 100 queries a time)... The file is basically a CREATE TABLE followed by thousads of INSERT queries and I have a lot of those (converted .DBF files to SQL queries using ABC DBF Converter) Any idea will be very appreciated!

    Read the article

  • Listing all shared memory segments used by a process on AIX5.3+

    - by Frank Meerkötter
    I would like to find all shared memory segments used by a given process. I am especially interested in figuring out the shmid so i can use it in calls to shmctl(). On Solaris i would just read /proc/$PID/map to figure out that information (field pr_shmid). The contents of that file are defined by struct prmap_t in sys/procfs. AIX also has a /proc/$PID/map file. There is also a struct prmap but unfortunately it is missing the pr_shmid field. Any ideas how i can achieve this on AIX5.3+?

    Read the article

  • UIImage from NSDocumentDirectory leaking memory

    - by Emil
    Hey. I currently have this code: UIImage *image = [[UIImage alloc] initWithContentsOfFile:[imagesPath stringByAppendingPathComponent:[NSString stringWithFormat:@"/%@.png", [postsArrayID objectAtIndex:indexPath.row]]]]; It's loading in an image to set in a UITableViewCell. This obviously leaks a lot of memory (I do release it, two lines down after setting the cells image to be that image), and I'm not sure if it caches the image at all. Is there another way, that doesen't leak so much, I can use to load in images multiple times, like in a tableView, from the Documents-directory of my app? Thanks.

    Read the article

  • Understanding memory and cpu speed

    - by tipu
    Firstly, I am working on a windows xp 64 machine with 4gb ram and 2.29 ghz x4 I am indexing 220,000 lines of text that are more or less the same length. These are divided into 15 equally sized files. File 1/15 takes 1 minute to index. As the script indexes more files, it seems to take much longer with file 15/15 taking 40 minutes. My understanding is that the more I put in memory, the faster the script is. The dictionary is indexed in a hash, so fetch operations should be O(1). I am not sure where the script would be hanging the CPU. I have the script here.

    Read the article

  • PHP array taking up too much memory

    - by Dylan Taylor
    I have a multidimensional array. The array itself is fine. My problem is that the script takes up monster amounts of memory, and since I'm running this on my MAMP install on my iBook G4, my computer freezes up. Below is the full script. $query = "SELECT * FROM posts ORDER BY id DESC LIMIT 10"; $result = mysql_query($query); $posts = array(); while($row = mysql_fetch_array($result)){ $posts[$row["id"]]['post_id'] = $row["id"]; $posts[$row["id"]]['post_title'] = $row["title"]; $posts[$row["id"]]['post_text'] = $row["text"]; $posts[$row["id"]]['post_tags'] = $row["tags"]; $posts[$row["id"]]['post_category'] = $row["category"]; foreach ($posts as $post) { echo $post["post_id"]; } Is there a workaround that still achieves my goal (to export the MySQL query rows to an array)? -Dylan

    Read the article

  • PHP array taking up to much memory

    - by Dylan Taylor
    I have a multidimensional array. The array itself is fine. My problem is that the script takes up monster amounts of memory, and since I'm running this on my MAMP install on my iBook G4, my computer freezes up. Below is the full script. $query = "SELECT * FROM posts ORDER BY id DESC LIMIT 10"; $result = mysql_query($query); $posts = array(); while($row = mysql_fetch_array($result)){ $posts[$row["id"]]['post_id'] = $row["id"]; $posts[$row["id"]]['post_title'] = $row["title"]; $posts[$row["id"]]['post_text'] = $row["text"]; $posts[$row["id"]]['post_tags'] = $row["tags"]; $posts[$row["id"]]['post_category'] = $row["category"]; foreach ($posts as $post) { echo $post["post_id"]; } Is there a workaround that still achieves my goal (to export the MySQL query rows to an array)? -Dylan

    Read the article

  • Allocated memory address clash

    - by Louis
    Hi, i don't understand how this happen. This is portion of my code.. int isGoal(Node *node, int startNode){ int i; . . } When i debug this using gdb i found out that 'i' was allocated at the memory address that have been previously allocated. (gdb)print &node->path->next $26 = (struct intNode **) 0xffbff2f0 (gdb) print &i $22 = (int *) 0xffbff2f0 node-path-next has been already defined outside this function. But as u can see they share the same address which at some point make the pointer point to another place when the i counter is changed. I compiled it using gcc on solaris platform Any helps would be really appreciated..

    Read the article

  • Memory Efficient file append

    - by lboregard
    i have several files whose content need to be merged into a single file. i have the following code that does this ... but it seems rather inefficient in terms of memory usage ... would you suggest a better way to do it ? the Util.MoveFile function simply accounts for moving files across volumes private void Compose(string[] files) { string inFile = ""; string outFile = "c:\final.txt"; using (FileStream fsOut = new FileStream(outFile + ".tmp", FileMode.Create)) { foreach (string inFile in files) { if (!File.Exists(inFile)) { continue; } byte[] bytes; using (FileStream fsIn = new FileStream(inFile, FileMode.Open)) { bytes = new byte[fsIn.Length]; fsIn.Read(bytes, 0, bytes.Length); } //using (StreamReader sr = new StreamReader(inFile)) //{ // text = sr.ReadToEnd(); //} // write the segment to final file fsOut.Write(bytes, 0, bytes.Length); File.Delete(inFile); } } Util.MoveFile(outFile + ".tmp", outFile); }

    Read the article

  • UITableView's cellForRowAtIndexPath is not getting called after low memory warning

    - by Jinesh
    I am new to COCOA and Objective C. I am working on an application which have two controllers with one table view in each, clicking an item form this table will lead to another controller to be pushed to the stack. All was working fine till i started handling low memory warning in app delegate. What i am doing in app delegate's applicationDidReceiveMemoryWarning is, deleting all of my model and popping out all controllers to its root view using popToRootViewControllerAnimated. Now my problem starts, once low mem warning is received table's cellForRowAtIndexPath is not getting called. All other methods of UITableViewDataSource is properly called. What i get on screen is a blank white screen. I am testing my app in iPhone OS 3.0 and development is done in Xcode V 3.1.3. Hope you guys can help me to nail this. Thanks in advance, Jinesh.

    Read the article

  • Is java HashMap.clear() and remove() memory effective?

    - by Shaman
    Consider the follwing HashMap.clear() code: /** * Removes all of the mappings from this map. * The map will be empty after this call returns. */ public void clear() { modCount++; Entry[] tab = table; for (int i = 0; i < tab.length; i++) tab[i] = null; size = 0; } It seems, that the internal array (table) of Entrys is never shrinked. So, when I add 10000 elements to a map, and after that call map.clear(), it will keep 10000 nulls in it's internal array. So, my question is, how does JVM handle this array of nothing, and thus, is HashMap memory effective?

    Read the article

  • Pre-allocate memory between HostApp and DLL

    - by Leo
    I have a DLL which provided a decoding function, as follows: function MyDecode (Source: PChar; SourceLen: Integer; var Dest: PChar; DestLen: Integer): Boolean; stdcall; The HostApp call "MyDecode", and transfer into the Source, SourceLen and Dest parameters, the DLL returns decoded Dest and DestLen. The problem is: The HostApp impossible to know decoded Dest length, and therefore would not know how to pre-allocated Dest's memory. I know that can split "MyDecode" into two functions: function GetDecodeLen (Source: PChar; SourceLen: Integer): Integer; stdcall; // Return the Dest's length function MyDecodeLen (Source: PChar; SourceLen: Integer; var Dest: PChar): Boolean; stdcall; But, My decoding process is very complicated, so if split into two functions will affect the efficiency. Is there a better solution?

    Read the article

  • Memory Issues When DOM Parsing A Large XML File on Android Devices

    - by tonyc
    Hey awesome SO users, I have an Android application that parses an XML file for users and displays results in a much more mobile friendly format. The app works great for most users, but some users have lots and lots of data and the app crashes on them because it runs out of memory. Is there any way I have a DOM style XML parser quit parsing data after a certain amount of parsing? I only need the first 30 or so elements so it would make the application much more efficient. I'd like to use a SAX or pull parser instead, but the XML I'm parsing is not valid and I have no control over it. Unless anyone has some good SAX solutions that let me parse messy, invalid XML, I think DOM is the only way to go. Thanks for reading!

    Read the article

  • Addressing a memory leak stops my UI from showing iphone

    - by dubbeat
    Hi I've being getting a memory leak warning with a UITabbarcontroller. If I release the tabbarcontroller the warning goes away but the tabbar will not show any content. If I debug the app with the warning still in it the app runs but will crash after a couple of minutes UITabBarController *tabBarController = [[UITabBarController alloc] init]; tabBarController.view.frame = CGRectMake(0, 0, 320, 460); tabBarController.viewControllers=localControllersArray; // Clean up objects we don't need anymore [promoTabOptionHome release]; [promoTabOptionInfo release]; [promoTabOptionEvents release]; [promoTabOptionBuy release]; [localControllersArray release]; // Finally, add the tab controller view to the parent view [self.view addSubview:tabBarController.view]; //[tabBarController release]; commenting out this line removes the warning but results in no content being shown

    Read the article

  • How do you implement Software Transactional Memory?

    - by Joseph Garvin
    In terms of actual low level atomic instructions and memory fences (I assume they're used), how do you implement STM? The part that's mysterious to me is that given some arbitrary chunk of code, you need a way to go back afterward and determine if the values used in each step were valid. How do you do that, and how do you do it efficiently? This would also seem to suggest that just like any other 'locking' solution you want to keep your critical sections as small as possible (to decrease the probability of a conflict), am I right? Also, can STM simply detect "another thread entered this area while the computation was executing, therefore the computation is invalid" or can it actually detect whether clobbered values were used (and thus by luck sometimes two threads may execute the same critical section simultaneously without need for rollback)?

    Read the article

  • iphone memory leaks and malloc?

    - by Brodie4598
    Okay so im finally to the point where I am testing my iPad App on an actual iPad... One thing that my app does is display a large (2mb) image in a scroll view. This is causing the iPad to get memory warnings. I run the app in the instruments to check for the leak. When I load the image, a leak is detected and i see the following in the allocations: ALl Allocations: 83.9 MB Malloc 48.55 MB: 48.55 MB Malloc 34.63 MB: 34.63 MB What im trying to understand is how to plug the leak obviously, but also why a 2MB image is causing a malloc of 20x that size I am very new to programming in obj-c so im sure this is an obvious thing, but I just cant figure it out. Here is the code:

    Read the article

  • SoundPlayer causing Memory Leaks?

    - by Nick Udell
    I'm writing a basic writing app in C# and I wanted to have the program make typewriter sounds as you typed. I've hooked the KeyPress event on my RichTextBox to a function that uses a SoundPlayer to play a short wav file every time a key is pressed, however I've noticed after a while my computer slows to a crawl and checking my processes, audiodlg.exe was using 5 GIGABYTES of RAM. The code I'm using is as follows: I initialise the SoundPlayer as a global variable on program start with SoundPlayer sp = new SoundPlayer("typewriter.wav") Then on the KeyPress event I simply call sp.Play(); Does anybody know what's causing the heavy memory usage? The file is less than a second long, so it shouldn't be clogging the thing up too much.

    Read the article

  • Make process crash on large memory allocation

    - by Pieter
    I'm trying to find a significant memory leak (15MB at a time, but doing allocations like this on multiple places). I checked the most obvious places, and then used AQTime, but I still can't pinpoint it. Now I see 2 options left: 1) Use SetProcessWorkingSetSize: I've tried this but my process happily keeps on running when using up more then 150MB: DWORD MemorySize = 150*1024*1024; SetProcessWorkingSetSize( GetCurrentProcess(), MemorySize/2, MemorySize*2 ); 2) Put a breakpoint when allocating more then 1MB at a time. How should I do this, overload operator new with an 'if1MB' inside ?

    Read the article

  • memory alignment issues with union

    - by confucius
    Hi all, Is there guarantee, that memory for this object will be properly aligned if we create this object of this type in stack? union my_union { int value; char bytes[4]; }; If we create char bytes[4] in stack and then try to cast it to integer there might be alignment problem. We can avoid that problem by creating it in heap, however, is there such guarantee for union objects? Logically there should be, but I would like to confirm. Thanks.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >