Hi,
The following question is a head-scratcher for me. Assuming that I have two platforms
with an identical hardware, the same OS and the same compiler on it. If I compile exactly the
same application, can I be sure that the memory layout on both machines will exactly be the same? In other words, both applications have exaclty the same ...
#include <iostream>
using namespace std;
int main(){
int findMax(int *);
const int MAX = 100;
int values[MAX];
char ivals[256];
// Get the space-separated values from user input.
cin.getline(ivals, 256, '0');
char *helper;
// Clean input array and transfer it to values.
for(int i = 0; i < (MAX) && iv...
Hi everyone,
I've been having a problem to show large images on a scrollview, the images are 2,4 - 4,7 MB. It runs fine on the 3GS and on the simulator. But whenever I try to run on a 3G or iPod Touch 2G, it crashes.
I searched across the web and found the "imageNamed is evil" article. Ok I changed all my image calls to imageWithConten...
Hi all,
While writing huge data to a file using java, how can one avoid java heap memory out of space error from occuring?..This is causing some failures for my program..
Regards,
magggi
...
I'm working with a single-threaded native c++ application.
There is a very hard to reproduce bug that I cannot reproduce locally.
I enabled full page heap and debug information in the release executable, and obtained dumps from a client (which has to use the application many days to get the bug).
What the client reports: the applicatio...
hello
i got a problem and i don't know how to solve it. this is what i try to do: the user picks an image from his album on his iphone. while the image will be saved in the application folder, a actionsheet should popup with an activity indicator on it till the saving process is done. below you can see how i tried to do it, but i think ...
I have the iPhone crash report and I am not able to get what is the problem with that. So, Can any one know what is the problem in the crash report?
Incident Identifier: 0C9E5908-BDA9-43B9-8D83-E2EF5E9B75A7
CrashReporter Key: 9cee5ee1497f05fb45986268e8ab8e42fcf2272d
Process: GRAHAM [94]
Path: /var/mobile/Application...
I'm using Apache + mod_wsgi daemon mode for running a Django site. When another site is added (new virtualhost), a second daemon appears.
Is there any way to let those sites share the same proces / memory?
It seems to wasteful to have ~20MB persistently in use per site.
Bonus points: how does this compare to PHP hosting? (especially Dr...
I'm getting a bunch of memory leaks for this bit of code in Instruments.
Here:
NSArray *tmpCoords = [loc.mapCoords componentsSeparatedByString:@","];
and Here:
coords.tileRow = [NSString stringWithFormat:@"%d",x];
coords.tileCol = [NSString stringWithFormat:@"%d",y];
Is there a better way to do this? I'm basically parsing ...
What exactly happens when I do this...?
NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL urlWithString:@"..."]];
Does it immediately go out to the Internet, gets all the data at the URL, returns, and goes to the next line? Or does it set things up, and the data is read later when the bytes of NSData are requested? If the d...
I'd like to know how much bytes a
32-bit integer
ASCII character (char in C++?)
Pointer (4 bytes?)
Short
Float
Takes up in Delphi, and if it is generally the same in most languages
Also, do the data types mentioned above have a constant size? I mean are the integers 0, 4, 123 and 32231 all of the same size?
...
Hello, I have this project I'm working on. The following conditions apply
In this project I need to create one huge array (hopefully I will be able to create one as big as ~7.13e+17, but this target is still up ahead.)
Each cell inside the array can contain one of the three values: 0,1,2
I'm using C++ as my language.
I tried using th...
Simple example:
template <class P> class MyT
{
struct Item
{
public:
Item() {}
P *pData;
Item *next;
};
Item *head;
public:
...adding etc..
P* operator [](int index)
{
See question below:
}
};
Can I somehow make sure that the 'Item's are allocated in such a way that I ...
The key difference between memcpy() and memmove() is that memmove() will work fine when source and destination overlap. When buffers surely don't overlap memcpy() is preferable since it's potentially faster.
What bothers me is this potentially. Is it a microoptimization or are there real significant examples when memcpy() is faster so t...
How can I make sure that the objects get disposed that I am adding into the SerializationInfo object?
For example: if I am adding a hashtable to the info object, how do I make sure that after serialization, there is no reference alive to the hastable object of my class and I can free the memory somehow?
info.AddValue("attributesHash", ...
Hi folks, here is a simple question. Can you help me find the memory leak in this Vala code ?
If it helps I can post the generated c code too ^^
using GLib;
using Gtk;
using Gee;
void test1 ()
{
Gee.ArrayList<Gdk.Pixbuf> list = new Gee.ArrayList<Gdk.Pixbuf>();
for( int a = 0; a < 10000; a++)
{
string path = "/usr...
I'm becoming more interested in API's and was about starting to write my own, but then I was thinking a bit about the standard library of Java.
The standard library of Java has a String class with tons of methods, isn't this bad design? I mean, if I would create a new instance of the String class, it would create an object with dozens o...
Hi,
My executable swing client throws out of memory exception when executed from a remote machine. However, executing the client from command line (increasing the heap space) using the following command works.
java -XMx128m -Xms128m -jar myclient.jar
I do not want the remote users use my client through command line as shown above. So,...
Hello I been trying to find this memory leak for a while now and no luck.
What I have is a server that serves requests for a flash client security acceptance. It only sends out one packet nothing more but has the power to hold over 10,000 concurrent connections? maybe 65,534 if it has too.
Anyways after serving about 210,000+ users in ...
I've tried running a variety of live wallpapers. When I set a different one to be live, the old one still shows up in the adb shell when I type 'ps':
app_37 12107 1870 125356 16932 ffffffff afe0da04 S fishnoodle.aquarium_free
app_50 12196 1870 109620 16804 ffffffff afe0da04 S com.geekyouup.android.snowpaper
My own one that I...