Search Results

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

Page 24/494 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Flushing writes in buffer of Memory Controller to DDR device

    - by Rohit
    At some point in my code, I need to push the writes in my code all the way to the DIMM or DDR device. My requirement is to ensure the write reaches the row,ban,column of the DDR device on the DIMM. I need to read what I've written to the main memory. I do not want caching to get me the value. Instead after writing I want to fetch this value from main memory(DIMM's). So far I've been using Intel's x86 instruction wbinvd(write back and invalidate cache). However this means the caches and TLB are flushed. Write-back requests go to the main memory. However, there is a reasonable amount of time this data might reside in the write buffer of the Memory Controller( Intel calls it integrated memory controller or IMC). The Memory Controller might take some more time depending on the algorithm that runs in the Memory Controller to handle writes. Is there a way I force all existing or pending writes in the write buffer of the memory controller to the DRAM devices ?? What I am looking for is something more direct and more low-level than wbinvd. If you could point me to right documents or specs that describe this I would be grateful. Generally, the IMC has a several registers which can be written or read from. From looking at the specs for that for the chipset I could not find anything useful. Thanks for taking the time to read this.

    Read the article

  • .NET memory leak?

    - by SA
    I have an MDI which has a child form. The child form has a DataGridView in it. I load huge amount of data in the datagrid view. When I close the child form the disposing method is called in which I dispose the datagridview this.dataGrid.Dispose(); this.dataGrid = null; When I close the form the memory doesn't go down. I use the .NET memory profiler to track the memory usage. I see that the memory usage goes high when I initially load the data grid (as expected) and then becomes constant when the loading is complete. When I close the form it still remains constant. However when I take a snapshot of the memory using the memory profiler, it goes down to what it was before loading the file. Taking memory snapshot causes it to forcefully run garbage collector. What is going on? Is there a memory leak? Or do I need to run the garbage collector forcefully? More information: When I am closing the form I no longer need the information. That is why I am not holding a reference to the data.

    Read the article

  • Memory interleaving

    - by Tim Green
    Hello, I have this question that has me rather confused. Suppose that a 1G x 32-bit main memory is built using 256M x 4-bit RAM chips and that this memory is byte-addressable. I have deduced that one would require 4*1G = 2^2*2*30 = 2^32 - so 32 bits to address the full memory. My problem now comes with, say, if you had memory (byte) address "14", determine which memory module this would go into. (There would have to be 8 chips per module to make the 32-bit wide memory, and 4 modules overall giving 32 chips in total. Modules are numbered from 0). In high-order interleave, it appears trivial that it's the first (0) memory module given a lot of the first few bits are 0. However, low-order interleave has me stumped. I can't figure out (for sure) how many bits are used to determine a memory module (possibly 2, given there are 4 in total?). The given solution is Module 3. This is not homework in the same sense so I will not be tagging it as such.

    Read the article

  • Memory leak on CollectionView.View.Refresh

    - by Dabblernl
    I have defined my binding thus: <TreeView ItemsSource="{Binding UsersView.View}" ItemTemplate="{StaticResource MyDataTemplate}" /> The CollectionViewSource is defined thus: private ObservableCollection<UserData> users; public CollectionViewSource UsersView{get;set;} UsersView=new CollectionViewSource{Source=users}; UsersView.SortDescriptions.Add( new SortDescription("IsLoggedOn",ListSortDirection.Descending); UsersView.SortDescriptions.Add( new SortDescription("Username",ListSortDirection.Ascending); So far, so good, this works as expected: The view shows first the users that are logged on in alphabetical order, then the ones that are not. However, the IsLoggedIn property of the UserData is updated every few seconds by a backgroundworker thread and then the code calls: UsersView.View.Refresh(); on the UI thread. Again this works as expected: users that log on are moved from the bottom of the view to the top and vice versa. However: Every time I call the Refresh method on the view the application hoards 3,5MB of extra memory, which is only released after application shutdown (or after an OutOfMemoryException...) I did some research and below is a list of fixes that did NOT work: The UserData class implements INotifyPropertyChanged Changing the underlying users collection does not make any difference at all: any IENumerable<UserData as a source for the CollectionViewSource causes the problem. -Changing the ColletionViewSource to a List<UserData (and refreshing the binding) or inheriting from ObservableCollection to get access to the underlying Items collection to sort that in place does not work. I am out of ideas! Help? EDIT: I found it: The Resource MyDataTemplate contains a Label that is bound to a UserData object to show one of its properties, the UserData objects being handed down by the TreeView's ItemsSource. The Label has a ContextMenu defined thus: <ContextMenu Background="Transparent" Width="325" Opacity=".8" HasDropShadow="True"> <PrivateMessengerUI:MyUserData IsReadOnly="True" > <PrivateMessengerUI:MyUserData.DataContext> <Binding Path="."/> </PrivateMessengerUI:MyUserData.DataContext> </PrivateMessengerUI:MyUserData> </ContextMenu> The MyUserData object is a UserControl that shows All properties of the UserData object. In this way the user first only sees one piece of data of a user and on a right click sees all of it. When I remove the MyUserData UserControl from the DataTemplate the memory leak disappears! How can I still implement the behaviour as specified above?

    Read the article

  • Memory leak dyld dlopen

    - by imthi
    I am getting leak and I cannot detect from where this is happening. The stack trace does not give full info after dyld open. For few leaks I am not getting any stack trace info. All I get is only object memory address. Is anyone else facing the same issue. I am using XCode 3.2 on show leopard. 18 0x103038 17 0x1033c7 16 0x1034a1 15 0x90145f48 14 dyld dlopen 13 dyld dyld::link(ImageLoader*, bool, ImageLoader::RPathChain const&) 12 dyld ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, ImageLoader::RPathChain const&) 11 dyld ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&) 10 dyld dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) 9 dyld dyld::load(char const*, dyld::LoadContext const&) 8 dyld dyld::loadPhase0(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 7 dyld dyld::loadPhase1(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 6 dyld dyld::loadPhase3(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 5 dyld dyld::loadPhase4(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 4 dyld dyld::loadPhase5(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 3 dyld dyld::mkstringf(char const*, ...) 2 dyld strdup 1 dyld mallocenter

    Read the article

  • Iphone - UITextView Memory-leak

    - by Raphael Pinto
    I have a memory leak when i use a UITextView but I don't understand why : UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20, 160, 280, 150)]; textView.text = @"Hello World"; textView.editable = FALSE; [self.view addSubview:textView]; [textView release]; Is someone could help me? :S

    Read the article

  • Memory Leak in returning NSMutableArray from class

    - by Structurer
    Hi I am quite new to Objective C for the iPhone, so I hope you wont kill me for asking a simple question. I have made an App that works fine, except that Instruments reports memory leaks from the class below. I use it to store settings from one class and then retrieve them from another class. These settings are stored on a file so they can be retrieved every time the App is ran. What can I do do release the "setting" and is there anything that can be done to call (use) the class in a smarter way? Thanks ----- Below is Settings.m ----- import "Settings.h" @implementation Settings @synthesize settings; -(NSString *)dataFilePath // Return path for settingfile, including filename { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:kUserSettingsFileName]; } -(NSMutableArray *)getParameters // Return settings from disk after checking if file exist (if not create with default values) { NSString *filePath = [self dataFilePath]; if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) // Getting data from file { settings = [[NSMutableArray alloc] initWithContentsOfFile:filePath]; } else // Creating default settings { settings = [[NSMutableArray alloc] initWithObjects: [NSNumber numberWithInteger:50], [NSNumber numberWithInteger:50], nil]; [settings writeToFile:[self dataFilePath] atomically:YES]; } return settings; } ----- Below is my other class from where I call my Settings class ----- // Get settings from file Settings *aSetting = [[Settings alloc] init]; mySettings = [aSetting getParameters]; [aSetting release];

    Read the article

  • CoreData leak when reading a property

    - by Kamchatka
    Hello, I have the following code in a loop iterating over the different document objects: NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; [document primitiveValueForKey:@"data"]; [data writeToFile:filename atomically:NO]; [document.managedObjectContext refreshObject:document mergeChanges:NO]; [pool release]; The "data" property is a large blob (a 1MB image). And as I monitor the memory with the Allocation Instrument memory usage is increasing. I cannot find where the leak is coming from and how to remove it. Thanks!

    Read the article

  • Pointers in For loops

    - by Bobby
    Quick question: I am a C# guy debugging a C++ app so I am not used to memory management. In the following code: for(int i = 0; i < TlmMsgDB.CMTGetTelemMsgDBCount(); i++) { CMTTelemetryMsgCls* telm = TlmMsgDB.CMTGetTelemetryMsg(i); CMT_SINT32_Tdef id = telm->CMTGetPackingMapID(); ManualScheduleTables.SetManualMsg(i,id); ManualScheduleTables.SetManExec(i,false); } Am I leaking memory every iteration b/c of CMTTelemetryMsgCls* telm = TlmMsgDB.CMTGetTelemetryMsg(i);? The "CMTGetTelemetryMsg(int)" method returns a pointer. Do I have to "delete telm;" at the end of each iteration?

    Read the article

  • Avoid an "out of memory error" in Java(eclipse), when using large data structure?

    - by gnomed
    OK, so I am writing a program that unfortunately needs to use a huge data structure to complete its work, but it is failing with a "out of memory error" during its initialization. While I understand entirely what that means and why it is a problem, I am having trouble overcoming it, since my program needs to use this large structure and I don't know any other way to store it. The program first indexes a large corpus of text files that I provide. This works fine. Then it uses this index to initialize a large 2D array. This array will have nXn entries, where "n" is the number of unique words in the corpus of text. For the relatively small chunk I am testing it on(about 60 files) it needs to make approximately 30,000x30,000 entries. this will probably be bigger once I run it on my full intended corpus too. It consistently fails every time, after it indexes, while it is initializing the data structure(to be worked on later). Things I have done include: revamp my code to use a primitive "int[]" instead of a "TreeMap" eliminate redundant structures, etc... Also, I have run eclipse with "eclipse -vmargs -Xmx2g" to max out my allocated memory I am fairly confident this is not going to be a simple line of code solution, but is most likely going to require a very new approach. I am looking for what that approach is, any ideas? Thanks, B.

    Read the article

  • Diagnosing Solaris 8 server memory and swap space usage

    - by datSilencer
    Hello everyone. Essentially, my question is related to memory allocation for Solaris virtual machines. I am running a couple of old Sun ONE 6 Java web servers on two Solaris 8 virtual machines. I see that there's a reasonable amount of swap space being used, but I'm not exactly sure if this could indicate a need to add more RAM to these machines. At service peak hours (mornings usually), the response time of the web application these servers host jumps up to at most 11 seconds (somewhat detrimental for a relatively simple web page loading action). Average response time at non peak times is about 5 seconds. What would you be able to infer about the RAM usage for these machines from the ouput below? Is this information reasonably sufficient? Or would I need to run some other commands to rule out server memory starvation? Finally, since there is a Java application at the core of the setup, I've also thought about: 1) Trace the heap's Object allocation to detect potential memory leaks. 2) Do some performance profiling to see if this instead related to networking delays. I mention this since the application talks with a single Oracle Database, but I would doubt this to be the case since they're pretty close from a network segmentation perspective. I appreciate any kind of insight and feedback you could provide. Thanks for your time and help. Server 1: 40 processes: 38 sleeping, 1 zombie, 1 on cpu CPU states: 99.1% idle, 0.4% user, 0.4% kernel, 0.0% iowait, 0.0% swap Memory: 2048M real, 295M free, 865M swap in use, 3788M swap free PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND 12676 webservd 112 29 10 616M 242M sleep 103:37 0.48% webservd 18317 root 1 59 0 23M 19M sleep 67:24 0.08% perl 9479 support 1 59 0 6696K 2448K cpu/1 0:11 0.05% top 8012 root 10 59 0 34M 704K sleep 80:54 0.04% java 1881 root 33 29 10 110M 13M sleep 33:03 0.02% webservd 7808 root 1 59 0 83M 67M sleep 7:59 0.00% perl 1461 root 20 59 0 5328K 1392K sleep 6:49 0.00% syslogd 1691 root 2 59 0 27M 680K sleep 4:22 0.00% webservd 24386 root 1 59 0 15M 11M sleep 2:50 0.00% perl 23259 root 1 59 0 11M 4240K sleep 2:42 0.00% perl 24718 root 1 59 0 11M 5464K sleep 2:29 0.00% perl 22810 root 1 59 0 19M 11M sleep 2:21 0.00% perl 24451 root 1 53 2 11M 3800K sleep 2:18 0.00% perl 18501 root 1 56 1 11M 3960K sleep 2:18 0.00% perl 14450 root 1 56 1 15M 6920K sleep 1:49 0.00% perl Server 2 42 processes: 40 sleeping, 1 zombie, 1 on cpu CPU states: 98.8% idle, 0.4% user, 0.8% kernel, 0.0% iowait, 0.0% swap Memory: 1024M real, 31M free, 554M swap in use, 3696M swap free PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND 5607 webservd 74 29 10 284M 173M sleep 20:14 0.21% webservd 15919 support 1 59 0 4056K 2520K cpu/1 0:08 0.09% top 13138 root 10 59 0 34M 1952K sleep 210:51 0.08% java 13753 root 1 59 0 22M 12M sleep 170:15 0.07% perl 22979 root 33 29 10 112M 7864K sleep 85:07 0.04% webservd 22930 root 1 59 0 3424K 1552K sleep 17:47 0.01% xntpd 22978 root 2 59 0 27M 2296K sleep 10:49 0.00% webservd 13571 root 1 59 0 9400K 5112K sleep 5:52 0.00% perl 5606 root 2 29 10 29M 9056K sleep 0:36 0.00% webservd 15910 support 1 59 0 9128K 2616K sleep 0:00 0.00% sshd 13106 root 1 59 0 82M 3520K sleep 7:47 0.00% perl 13547 root 1 59 0 12M 5528K sleep 6:38 0.00% perl 13518 root 1 59 0 9336K 3792K sleep 6:24 0.00% perl 13399 root 1 56 1 8072K 3616K sleep 5:18 0.00% perl 13557 root 1 53 2 8248K 3624K sleep 5:12 0.00% perl

    Read the article

  • AMD 24 core server memory bandwidth

    - by ntherning
    I need some help to determine whether the memory bandwidth I'm seeing under Linux on my server is normal or not. Here's the server spec: HP ProLiant DL165 G7 2x AMD Opteron 6164 HE 12-Core 40 GB RAM (10 x 4GB DDR1333) Debian 6.0 Using mbw on this server I get the following numbers: foo1:~# mbw -n 3 1024 Long uses 8 bytes. Allocating 2*134217728 elements = 2147483648 bytes of memory. Using 262144 bytes as blocks for memcpy block copy test. Getting down to business... Doing 3 runs per test. 0 Method: MEMCPY Elapsed: 0.58047 MiB: 1024.00000 Copy: 1764.082 MiB/s 1 Method: MEMCPY Elapsed: 0.58012 MiB: 1024.00000 Copy: 1765.152 MiB/s 2 Method: MEMCPY Elapsed: 0.58010 MiB: 1024.00000 Copy: 1765.201 MiB/s AVG Method: MEMCPY Elapsed: 0.58023 MiB: 1024.00000 Copy: 1764.811 MiB/s 0 Method: DUMB Elapsed: 0.36174 MiB: 1024.00000 Copy: 2830.778 MiB/s 1 Method: DUMB Elapsed: 0.35869 MiB: 1024.00000 Copy: 2854.817 MiB/s 2 Method: DUMB Elapsed: 0.35848 MiB: 1024.00000 Copy: 2856.481 MiB/s AVG Method: DUMB Elapsed: 0.35964 MiB: 1024.00000 Copy: 2847.310 MiB/s 0 Method: MCBLOCK Elapsed: 0.23546 MiB: 1024.00000 Copy: 4348.860 MiB/s 1 Method: MCBLOCK Elapsed: 0.23544 MiB: 1024.00000 Copy: 4349.230 MiB/s 2 Method: MCBLOCK Elapsed: 0.23544 MiB: 1024.00000 Copy: 4349.359 MiB/s AVG Method: MCBLOCK Elapsed: 0.23545 MiB: 1024.00000 Copy: 4349.149 MiB/s On one of my other servers (based on Intel Xeon E3-1270): foo2:~# mbw -n 3 1024 Long uses 8 bytes. Allocating 2*134217728 elements = 2147483648 bytes of memory. Using 262144 bytes as blocks for memcpy block copy test. Getting down to business... Doing 3 runs per test. 0 Method: MEMCPY Elapsed: 0.18960 MiB: 1024.00000 Copy: 5400.901 MiB/s 1 Method: MEMCPY Elapsed: 0.18922 MiB: 1024.00000 Copy: 5411.690 MiB/s 2 Method: MEMCPY Elapsed: 0.18944 MiB: 1024.00000 Copy: 5405.491 MiB/s AVG Method: MEMCPY Elapsed: 0.18942 MiB: 1024.00000 Copy: 5406.024 MiB/s 0 Method: DUMB Elapsed: 0.14838 MiB: 1024.00000 Copy: 6901.200 MiB/s 1 Method: DUMB Elapsed: 0.14818 MiB: 1024.00000 Copy: 6910.561 MiB/s 2 Method: DUMB Elapsed: 0.14820 MiB: 1024.00000 Copy: 6909.628 MiB/s AVG Method: DUMB Elapsed: 0.14825 MiB: 1024.00000 Copy: 6907.127 MiB/s 0 Method: MCBLOCK Elapsed: 0.04362 MiB: 1024.00000 Copy: 23477.623 MiB/s 1 Method: MCBLOCK Elapsed: 0.04262 MiB: 1024.00000 Copy: 24025.151 MiB/s 2 Method: MCBLOCK Elapsed: 0.04258 MiB: 1024.00000 Copy: 24048.849 MiB/s AVG Method: MCBLOCK Elapsed: 0.04294 MiB: 1024.00000 Copy: 23847.599 MiB/s For reference here's what I get on my Intel based laptop: laptop:~$ mbw -n 3 1024 Long uses 8 bytes. Allocating 2*134217728 elements = 2147483648 bytes of memory. Using 262144 bytes as blocks for memcpy block copy test. Getting down to business... Doing 3 runs per test. 0 Method: MEMCPY Elapsed: 0.40566 MiB: 1024.00000 Copy: 2524.269 MiB/s 1 Method: MEMCPY Elapsed: 0.38458 MiB: 1024.00000 Copy: 2662.638 MiB/s 2 Method: MEMCPY Elapsed: 0.38876 MiB: 1024.00000 Copy: 2634.043 MiB/s AVG Method: MEMCPY Elapsed: 0.39300 MiB: 1024.00000 Copy: 2605.600 MiB/s 0 Method: DUMB Elapsed: 0.30707 MiB: 1024.00000 Copy: 3334.745 MiB/s 1 Method: DUMB Elapsed: 0.30425 MiB: 1024.00000 Copy: 3365.653 MiB/s 2 Method: DUMB Elapsed: 0.30342 MiB: 1024.00000 Copy: 3374.849 MiB/s AVG Method: DUMB Elapsed: 0.30491 MiB: 1024.00000 Copy: 3358.328 MiB/s 0 Method: MCBLOCK Elapsed: 0.07875 MiB: 1024.00000 Copy: 13003.670 MiB/s 1 Method: MCBLOCK Elapsed: 0.08374 MiB: 1024.00000 Copy: 12228.034 MiB/s 2 Method: MCBLOCK Elapsed: 0.07635 MiB: 1024.00000 Copy: 13411.216 MiB/s AVG Method: MCBLOCK Elapsed: 0.07961 MiB: 1024.00000 Copy: 12862.006 MiB/s So according to mbw my laptop is 3 times faster than the server!!! Please help me explain this. I've also tried to mount a ram disk and use dd to benchmark it and I get similar differences so I don't think mbw is to blame. I've checked the BIOS settings and the memory seem to be running at full speed. According to the hosting company the modules are all OK. Could this have something to do with NUMA? It seems like Node Interleaving is disabled on this server. Will enabling it (thus turning off NUMA) make a difference? foo1:~# numactl --hardware available: 4 nodes (0-3) node 0 cpus: 0 1 2 3 4 5 node 0 size: 8190 MB node 0 free: 7898 MB node 1 cpus: 6 7 8 9 10 11 node 1 size: 12288 MB node 1 free: 12073 MB node 2 cpus: 18 19 20 21 22 23 node 2 size: 12288 MB node 2 free: 12034 MB node 3 cpus: 12 13 14 15 16 17 node 3 size: 8192 MB node 3 free: 8032 MB node distances: node 0 1 2 3 0: 10 20 20 20 1: 20 10 20 20 2: 20 20 10 20 3: 20 20 20 10

    Read the article

  • Memory Leaks - Objective-C

    - by reising1
    Can anyone help point out memory leaks? I'm getting a bunch within this method and I'm not sure exactly how to fix it. - (NSMutableArray *)getTop5AndOtherKeysAndValuesFromDictionary:(NSMutableDictionary *)dict { NSLog(@"get top 5"); int sumOfAllValues = 0; NSMutableArray *arr = [[[NSMutableArray alloc] init] retain]; for(NSString *key in dict){ NSString *value = [[dict objectForKey:key] retain]; [arr addObject:value]; sumOfAllValues += [value intValue]; } //sort values NSArray *sorted = [[arr sortedArrayUsingFunction:sort context:NULL] retain]; [arr release]; //top 5 values int sumOfTop5 = 0; NSMutableArray *top5 = [[[NSMutableArray alloc] init] retain]; for(int i = 0; i < 5; i++) { int proposedIndex = [sorted count] - 1 - i; if(proposedIndex >= 0) { [top5 addObject:[sorted objectAtIndex:([sorted count] - i - 1)]]; sumOfTop5 += [[sorted objectAtIndex:([sorted count] - i - 1)] intValue]; } } [sorted release]; //copy of all keys NSMutableArray *copyOfKeys = [[[NSMutableArray alloc] init] retain]; for(NSString *key in dict) { [copyOfKeys addObject:key]; } //copy of top 5 values NSMutableArray *copyOfTop5 = [[[NSMutableArray alloc] init] retain]; for(int i = 0; i < [top5 count]; i++) { [copyOfTop5 addObject:[top5 objectAtIndex:i]]; } //get keys with top 5 values NSMutableArray *outputKeys = [[[NSMutableArray alloc] init] retain]; for(int i = 0; i < [top5 count]; i++) { NSString *targetValue = [top5 objectAtIndex:i]; for(int j = 0; j < [copyOfKeys count]; j++) { NSString *key = [copyOfKeys objectAtIndex:j]; NSString *val = [dict objectForKey:key]; if([val isEqualToString:targetValue]) { [outputKeys addObject:key]; [copyOfKeys removeObjectAtIndex:j]; break; } } } [outputKeys addObject:@"Other"]; [top5 addObject:[[NSString stringWithFormat:@"%d",(sumOfAllValues - sumOfTop5)] retain]]; NSMutableArray *output = [[NSMutableArray alloc] init]; [output addObject:outputKeys]; [output addObject:top5]; NSMutableArray *percents = [[NSMutableArray alloc] init]; int sum = sumOfAllValues; float leftOverSum = sum * 1.0f; int count = [top5 count]; float val1, val2, val3, val4, val5; if(count >= 1) val1 = ([[top5 objectAtIndex:0] intValue] * 1.0f)/sum; else val1 = 0.0f; if(count >=2) val2 = ([[top5 objectAtIndex:1] intValue] * 1.0f)/sum; else val2 = 0.0f; if(count >= 3) val3 = ([[top5 objectAtIndex:2] intValue] * 1.0f)/sum; else val3 = 0.0f; if(count >= 4) val4 = ([[top5 objectAtIndex:3] intValue] * 1.0f)/sum; else val4 = 0.0f; if(count >=5) val5 = ([[top5 objectAtIndex:4] intValue] * 1.0f)/sum; else val5 = 0.0f; if(val1 >= .00001f) { NSMutableArray *a1 = [[NSMutableArray alloc] init]; [a1 addObject:[outputKeys objectAtIndex:0]]; [a1 addObject:[top5 objectAtIndex:0]]; [a1 addObject:[NSString stringWithFormat:@"%.01f",(val1*100)]]; [percents addObject:a1]; leftOverSum -= ([[top5 objectAtIndex:0] intValue] * 1.0f); } if(val2 >= .00001f) { NSMutableArray *a2 = [[NSMutableArray alloc] init]; [a2 addObject:[outputKeys objectAtIndex:1]]; [a2 addObject:[top5 objectAtIndex:1]]; [a2 addObject:[NSString stringWithFormat:@"%.01f",(val2*100)]]; [percents addObject:a2]; leftOverSum -= ([[top5 objectAtIndex:1] intValue] * 1.0f); } if(val3 >= .00001f) { NSMutableArray *a3 = [[NSMutableArray alloc] init]; [a3 addObject:[outputKeys objectAtIndex:2]]; [a3 addObject:[top5 objectAtIndex:2]]; [a3 addObject:[NSString stringWithFormat:@"%.01f",(val3*100)]]; [percents addObject:a3]; leftOverSum -= ([[top5 objectAtIndex:2] intValue] * 1.0f); } if(val4 >= .00001f) { NSMutableArray *a4 = [[NSMutableArray alloc] init]; [a4 addObject:[outputKeys objectAtIndex:3]]; [a4 addObject:[top5 objectAtIndex:3]]; [a4 addObject:[NSString stringWithFormat:@"%.01f",(val4*100)]]; [percents addObject:a4]; leftOverSum -= ([[top5 objectAtIndex:3] intValue] * 1.0f); } if(val5 >= .00001f) { NSMutableArray *a5 = [[NSMutableArray alloc] init]; [a5 addObject:[outputKeys objectAtIndex:4]]; [a5 addObject:[top5 objectAtIndex:4]]; [a5 addObject:[NSString stringWithFormat:@"%.01f",(val5*100)]]; [percents addObject:a5]; leftOverSum -= ([[top5 objectAtIndex:4] intValue] * 1.0f); } float valOther = (leftOverSum/sum); if(valOther >= .00001f) { NSMutableArray *a6 = [[NSMutableArray alloc] init]; [a6 addObject:[outputKeys objectAtIndex:5]]; [a6 addObject:[top5 objectAtIndex:5]]; [a6 addObject:[NSString stringWithFormat:@"%.01f",(valOther*100)]]; [percents addObject:a6]; } [output addObject:percents]; NSLog(@"mu - a"); //[arr release]; NSLog(@"mu - b"); //[copyOfKeys release]; NSLog(@"mu - c"); //[copyOfTop5 release]; NSLog(@"mu - c"); //[outputKeys release]; //[top5 release]; //[percents release]; return output; }

    Read the article

  • Better Flex memory profiling tools

    - by verveguy
    Does anyone know of any better tools that the Flex Builder Profiler? I've googled and googled to no avail. While the FB tools are OK for small apps / small leak situations, they're nowhere near adequate for wading through the thicket of object references that can arise in a large scale Flex app (that is leaking memory heavily). In particular, any reasonably complex view structure ends up with huge numbers of parent/child object references to the top level view - none of which are at all relevant to finding the one or two refs from outside the parent child subgraph that are causing the whole bolus to be non-GC'able. If no one has any better suggestions, I'm seriously considering writing a tool to parse the saved profile dumps that Flex Builder can generate so that I can do my own "graph pruning" to find the important refs. If I go this route, collaboration would be welcome!

    Read the article

  • Setting up SQL Server 2005 to use all available memory in 32bit Windows Server 2003 - and verifying

    - by Rizwan Kassim
    There are a number of questions along this line - but they either sometimes contradict each other, or don't show how to properly verify that everything is actually working - hopefully this can be comprehensive... I'm running SQL Server 2005 SP3 Standard on Windows Server 2003 R2 Standard. My server has 8GB of memory installed - my system is almost entirely used as a Database Server - there are some services running on them, but the OS + services can run within 1Gb of RAM. What I've done (please tell me if I'm doing something wrong): /3GB in the boot.ini. (To increase the amount of user-space memory available - info) /PAE in the boot.ini. (Windows claimed to be doing PAE even without this switch, somethow.) Enabled AWE in SQL Server. Enabled Lock Pages in Memory Option for users SYSTEM and Local Service. (info). SQL Server Standard doesn't seem to use this until Cumulative Update 4, which isn't installed on my server. (info) Set Min/Max Memory to : 1024Mb/5112Mb After doing all the above, we definately saw a level of improvement - but I'd like now to verify my settings, make sure that I'm making full use of the memory available. (There appeared to be a slowdown when max = 7Gb, so I edged off from that value, but it might have been just perceptual.) To verify, I checked the following levels in PerfMon : Process(sqlserv):Working Set : 76386304 SQL Server(Memory Manager) : Total Server Memory : 3538944 (I saw a doc that noted that this wasn't the full memory used by SQL Server, so I'm not sure whether to trust it) So -- my questions... Should my max be around 7Gb? If not, what should it be? Why is total server memory at 3.5G, when it's been allocated 5G? What is the proper metric for the amount of memory allocated to SQL Server? The Working Set seems a bit large... Am I possibly missing any steps in the setup? Any recommended resources on starting to tune the caching system now? Thanks

    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

  • How to find out memory layout of your data structure implementation on Linux 64bit machine

    - by ajay
    In this article, http://cacm.acm.org/magazines/2010/7/95061-youre-doing-it-wrong/fulltext the author talks about the memory layouts of 2 data structures - The Binary Heap and the B-Heap and compares how one has better memory layout than the other. http://deliveryimages.acm.org/10.1145/1790000/1785434/figs/f5.jpg http://deliveryimages.acm.org/10.1145/1790000/1785434/figs/f6.jpg I want to get hands on experience on this. I have an implementation of a N-Ary Tree and I want to find out the memory layout of my data structure. What is the best way to come up with a memory layout like the one in the article? Secondly, I think it is easier to identify the memory layout if it is an array based implementation. If the implementation of a Tree uses pointers then what Tools do we have or what kind of approach is required to map it's memory layout? Thanks!

    Read the article

  • Does the speed of memory define its voltage?

    - by Zak
    What I'm asking here is, if I order PC3200 memory is it all going to be 1.8V, or will some be 2.5, some 1.8, etc... I don't mean variation within a specific part #, but rather across part numbers, is there a variation where some PC 3200 memory would be incompatible with others because it is 2.5 v 1.8V .

    Read the article

  • Graphing process memory usage on Linux

    - by syrenity
    Hi. I'm trying to diagnose a memory leak in a process, and looking for a tool to graph it's memory usage over time. Is there any tool on Linux that supports diagramming in form similar to Windows PerfMon? I tried using IBM virtual assistant, but it works only on 32-bit, while I have 64-bit platform. Thanks.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >