Difference between Cache and Translation LookAside Buffer[TLB]
What is the difference between Cache and Translation LookAside Buffer[TLB] ? Thanks. ...
What is the difference between Cache and Translation LookAside Buffer[TLB] ? Thanks. ...
Hi I have this concrete problem, but if You find my initial design idea crazy and have a better suggestion, please let me know:) I have a UIView that acts as a container/background for adding other views. The important thing is that only one view is present at a time. So before doing any adding of views I do this: for(UIView *...
In a view based app, I display a view and once the user is finished with that view, Done is clicked and the view is removed. However, that does not dealloc the view, which is what I want to do. What is the proper way to dealloc this type of view? Currently, I'm nil'ing out the second view before it is called. That seems to work and t...
Turns out many innocently looking things are undefined behavior in C++. For example, once a non-null pointer has been delete'd even printing out that pointer value is undefined behavior. Now memory leaks are definitely bad. But what class situation are they - defined, undefined or what other class of behavior? ...
I'm trying to build a class for handling all sqlite3 work and I've encountered an EXC_BAD_ACCESS which I just can't explain. I am new to Objective-C development and memory management in general so I apologize if this is a stupid question. When initializing the class I get the path to the database file and keep it around: NSArray * docu...
I have some matlab code that will only run on 32 bit windows, but I need atleast 6 gb of ram to run it. In my lab the only machine that has 6gb ram is running 64 bit windows, is there some way to run this code on here? I am thinking of emulating a 32 bit windows and running it on that, will that work? ...
I'm trying to tracedown a huge slowdown in the heap memory functions in Vista and Windows 7 (I didn't test on any server editions). It doesn't happen on XP at all, only on Microsoft's newer operating systems. I originally ran into this problem with PHP complied on Windows. The scripts themselves seemed to run at the expected speed, but ...
I call ABAddressBookCopyPeopleWithName(book, fullname); which is supposed to return an array of ABRecords for all the names that match 'fullname' from the AddressBook. Since this has a 'Copy' in it's name, it's returning with a retain count of 1 which I should release. What if it couldn't find any matching names? Should I still release ...
I'm having an issue understanding why releasing an object that I just created is causing a memory access error in my application. I'm creating a bunch of objects and adding them to an NSMutableArray. After I add them to the array, I release them. The first time the function runs, things go smoothly. The second time the function runs,...
I was doing a foolish thing like from itertools import * rows = combinations(range(0, 1140), 17) all_rows = [] for row in rows: all_rows.append(row) No surprise I run out of memory address space (32 bit python 3.1) My question i, how do I calculate how much memory address space I will need for a large list? In this case the list i...
I have a class level int defined in my header file. In the .m file, I have a method that I'd like to take an int parameter, modify it and have the modified value reflected at the caller. For example: classLevelInt = 2; [self someMethod:classLevelInt]; //Here, I'd like classLevelInt to equal the value assigned to it in the method In...
If I have a list(or array, dictionary....) in python that could exceed the available memory address space, (32 bit python) what are the options and there relative speeds? (other than not making a list that large) Let me emphasize "could". The list could exceed the memory but I have know way of knowing before hand. If it started to exceed...
Hi, I have a mutable array and i would like to arrange it in a nested order upon some criteria. To achieve this I'd like to move certain elements to mutable arrays of another elements, removing them from the main mutable array, but without releasing them. Actually the question is about removing elements from array without releasing them...
I have created a macro to make reserve memory for my strings in C. It looks like this: #define newString(size) (char*)malloc(sizeof(char) + size) So is there any reason I shouldn't use this macro in my own personal projects? I know I shouldn't do this in production code because it would require everyone to have that header file and ev...
Hey all. I've been reading up on Apple's suggestions for when/where/how to use NSError versus @try/@catch/@finally. Essentially, my impression is that Apple thinks it best to avoid the use of exception handling language constructs except as a mechanism for halting program execution in unexpected error situations (maybe someone could give...
I have an abstract Base class and Derived class. int main () { Base *arrayPtr[3]; for (int i = 0; i < 3; i++) { arrayPtr[i] = new Derived(); } //some fuctions here delete[] arrayPtr; return 0; } I'm not sure how to use the delete operator. If I delete array of base class pointers as shown above, will this call de...
This program sorts input lines lexicographically, and I've come to this exercise in K&R: Rewrite readlines to store lines in an array supplied by main, rather than calling alloc to maintain storage. How much faster is the program? The original program is the same, just it used alloc to maintain storage for lines. So I edited it th...
I've been trying run Insure++ with some scientific code and it reports many errors, although to be fair it officially does not support K&R C and I don't know what having a lot of K&R functions has done to its evaluation process. The C and C++ code it is testing is being run in a DLL invoked from a WPF application. One error report that...
Hey folks, I am writing an optimazation algorithm which creates about 100 threads. Currently, I start them all at one time (for-loop) and after that I tell every thread that it should join(). My problem is now that each thread uses to much memory so the heap space exception won't take long. I want some kind of scheduling but don't know...
#import <Foundation/Foundation.h> int main (int argc, char const *argv[]) { SampClass *obj=[[SampClass alloc] init]; [obj release]; NSLog(@"%i", [obj retainCount]); return 0; } Why does this give retainCount of 1, when it should be 0 ...