Hi,
I have a few questions regarding memory handling in C++.
What's the different with Mystruct *s = new Mystruct and Mystruct s? What happens in the memory?
Looking at this code:
struct MyStruct{
int i;
float f;
};
MyStruct *create(){
MyStruct tmp;
tmp.i = 1337;
tmp.j = .5f;
return &tmp;
}
int main(){
...
I was just wondering, we have in memory database(IMDB) and we also have a way to put the database in a RAM Disk. So which would be faster? You valuable comments and experiences
...
Hello,
I looked over but couldn't find a decent answer.
I was wondering how printf works in case like this:
char arr[2] = {5,6};
printf ("%d%d",arr[0],arr[1]);
I was thinking that printf just walks through the format and when it encouter %d for example it reads 4 bytes from the it's current position... however that's gotta be misco...
#include<iostream>
using namespace std;
int main()
{
int hash, opp, i, j, c = 0;
//cout<<"enter hasmat army number and opponent number\n";
while(cin>>hash>>opp)
{
cout<<opp-hash<<endl;
}
}
time limit for this problem: 3.000 seconds
how can i verify and test this condition?
i'm submitting this to a compu...
I have downloaded a file from HttpConnection using the FileOutputStream in android and now its being written in phone's internal memory on path as i found it in File Explorer
/data/data/com.example.packagename/files/123.ics
Now, I want to open & read the file content from phone's internal memory to UI. I tried to do it by using the Fil...
Does creating a lot of private variables that may never be used increase file size and or memory usage of your application?
...
I need to read a 200mb "space"-separated file line-by-line and collect its contents into an array.
Every time I run the script, Perl throws an "out of memory" exception, but I don't understand why!
Some advice please?
#!/usr/bin/perl -w
use strict;
use warnings;
open my $fh, "<", "../cnai_all.csd";
my @parse = ();
while (<$fh>) {
...
I realized that any application which uses hibernate, fails to undeploy completely in Glassfish 2.1.1. Many classes remain in memory after the undeployment process, you can check it using jmap and jhat.
I've done several tests, and figured out that only applications which had hibernate failed to have a clen undeploy process. My Databas...
-(IBAction)customizeYourGameButtonClicked:(id)sender {
[self playHumanHitSound];
self.customizeYourGameViewController = [[CustomizeYourGameViewController alloc]
initWithNibName:@"CustomizeYourGameViewController" bundle:nil];
[self.navigationController
pushViewController:customizeYourGameViewController animated:YES];
[custo...
I posted a much longer question a few minutes ago, and as it usually goes as soon as I posted it I realized what was going on, so I deleted it since most of the post was irrelevant. Then I went back to Google.
Turns out I'm having almost the same exact problem as described in this post, unanswered from June. http://www.iphonedevsdk.com/...
i'm doing simulation which generates thousands of result objects.
Each object size is around 1mb, and all the result objects should be on memory to be queried for various ad hoc reports. And it takes 1~2 secs to make one result object.
So it takes more than 5 minutes to get one simulation done even though i fully use my quad-core cpu wi...
Hi friends,
Do anyone know maximum how many screen we can push in an UiApplication without calling popscreen() and what will be the maximum file size of each screen class.
Thanks as Regards
Mintu
...
I'm working on trying to speed up some general data processing in C. I've written several subroutines of the form:
double *do_something(double *arr_in, ...) {
double *arr_out;
arr_out = malloc(...)
for (...) {
do the something on arr_in and put into arr_out
}
return arr_out;
}
I like this style because it's eas...
I know MBX model has limit of 24MB VRAM. How about SGX models?
And can I assume all iPhone/iPod touch models have SGX or MBX at least? No other models?
And how much memory bandwidth (to/from GPU) they have?
...
Example:
0:074> !address -summary
--- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
Free 90919 7ec`34659000 ( 7.923 Tb) 99.03%
<unclassified> 95426 12`3c3e9000 ( 72.941 Gb) 92.12% 0.89%
Heap ...
hey all, I have a file on disk that's only 168MB. It's just a comma separated list of word,id
the word can be 1-5 words long. There's 6.5 million lines. I created a dictionary in python to load this up into memory so I can search incoming text against that list of words. When python loads it up into memory it shows 1.3 GB's of RAM space ...
I'm posting this question again but this time I'm including the full code. It's extremely long, but here goes nothing. I don't know where to release thePath? I believe it's the last of my leaks, hopefully.
-(void)MoveObject:(int)Tag
{
representationX = gameViewObj.spaceshipImageView.center.x;
representationY = g...
I am following this tutorial (http://theocacao.com/document.page/234). I am confused about this paragraph, mainly the lines relating to calloc:
We can also use a variation of the malloc function, called calloc. The calloc function takes two arguments, a value count and the base value size. It also clears the memory before returning a...
Hello:
I'm getting some odd behavior in one of my class members and it is truly throwing me for a loop but I'm certainly not seeing the issue (long week!)
void MyFakeStringClass::readStream( iostream& nInputStream )
{
// Hold the string size
UINT32 size = 0;
// Read the size from the stream
nInputStream.read( reinterpr...
How to search given sequence of bytes in a computer memory? ReadProcessMemory API does not suit because it only reads process memory, not whole memory.
Is there any existent solutions?
...