Search Results

Search found 12282 results on 492 pages for 'memory deallocation'.

Page 92/492 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Why is address zero used for null pointer?

    - by Joel
    In C (or C++ for that matter), pointers are special if they have the value zero: I am adviced to set pointers to zero after freeing their memory, because it means freeing the pointer again isn't dangerous; when I call malloc it returns a pointer with the value zero if it can't get me memory; I use if (p != 0) all the time to make sure passed pointers are valid etc. But since memory addressing starts at 0, isn't 0 just as a valid address as any other? How can 0 be used for handling null pointers if that is the case? Why isn't a negative number null instead?

    Read the article

  • How does C free() work?

    - by slee
    #include <stdio.h> #include <stdlib.h> int * alloc() { int *p = (int *)calloc(5,4); printf("%d\n",p); return p; } int main() { int *p = alloc(); free(p); printf("%d\n",p); p[0] = 1; p[1] = 2; printf("%d %d\n",p[0],p[1]); } As to the code segment, I allocate 5 ints,first. And then I free the memory. When I printf p, why does p sill have a value same to the memory address allocated first? And I also can assign value to p[0] and p[1]. Does this mean free() do nothing? Once I allocate memory, I can use later though I have freed it.

    Read the article

  • C or C++: how do loaders/wrappers work?

    - by guitar-
    Here's an example of what I mean... User runs LOADER.EXE program LOADER.EXE downloads another EXE but keeps it all in memory without saving it to disk Runs the downloaded EXE just as it would if it were executed from disk, but does it straight from memory I've seen a few applications like this, and I've never seen an example or an explanation of how it works. Does anyone know? Another example is having an encrypted EXE embedded in another one. It gets extracted and decrypted in memory, without ever being saved to disk before it gets executed. I've seen that one used in some applications to prevent piracy.

    Read the article

  • Access violation C++ (Deleting items in a vector)

    - by Gio Borje
    I'm trying to remove non-matching results from a memory scanner I'm writing in C++ as practice. When the memory is initially scanned, all results are stored into the _results vector. Later, the _results are scanned again and should erase items that no longer match. The error: Unhandled exception at 0x004016f4 in .exe: 0xC0000005: Access violation reading location 0x0090c000. // Receives data DWORD buffer; for (vector<memblock>::iterator it = MemoryScanner::_results.begin(); it != MemoryScanner::_results.end(); ++it) { // Reads data from an area of memory into buffer ReadProcessMemory(MemoryScanner::_hProc, (LPVOID)(*it).address, &buffer, sizeof(buffer), NULL); if (value != buffer) { MemoryScanner::_results.erase(it); // where the program breaks } }

    Read the article

  • c++ link temporary allocations in fuction to custom allocator?

    - by user300713
    Hi, I am currently working on some simple custom allocators in c++ which generally works allready. I also overloaded the new/delete operators to allocate memory from my own allocator. Anyways I came across some scenarios where I don't really know where the memory comes from like this: void myFunc(){ myObj testObj(); ....do something with it } In this case testObj would only be valid inside the function, but where would its memory come from? Is there anyway I could link it to my allocator? Would I have to create to object using new and delete or is there another way? Thanks

    Read the article

  • Unpause application in Mac OS X

    - by Xster
    I tried parsing a gigantic XML file and I ended up running out of virtual memory. The OS put all my applications on pause and gave me a screen to shutdown applications to free more space. I killed the XML parsing application and now have tons of space but I can't resume my paused applications anymore. What should I do?

    Read the article

  • Prevent important OS X process being swapped out, without code change?

    - by purplie
    I want hotkey-based utilities like Quicksilver or Zooom to respond immediately. But if they have been idle for a while, they (I guess) get swapped out, and respond slowly, sometimes not even responding to the first few keystrokes I wanted to send to them. How can I encourage such processes (i.e. chosen processes, not all processes system wide) to remain in active memory? Or, am I misunderstanding the problem?

    Read the article

  • Any rerefence of CPU world statistics?

    - by Áxel Costas Pena
    I am looking for any referencee about computer power statistics across the world. My main interest is about real computing capabilities, so I'd prefer information about real processor power, and even best if it includes also other critical hardware statistics, like RAM memory, but if it isn't possible, maybe statistics about brand/model distribution will be also useful. I've Googled for some minutes and I've found nothing related.

    Read the article

  • CPU/Mem/Disk utilization (average) after process has completed

    - by BassKozz
    Ubuntu Server 9.10 So there is the time command which will show you the time it took for a specific process/command to run after the command has completed. For example: :~$ time ls real 0m0.020s user 0m0.000s sys 0m0.000s I'd like to also collect the average CPU usage, Memory, and Disk (i/o) utilization after the process has completed using time (or another command if necessary). How can I accomplish this? Mainly I am using this to benchmark MySQL import performance using different innodb_buffer_pool_size settings.

    Read the article

  • Windows XP blue screen 0x8E error troubleshooting

    - by dotnet-practitioner
    I get following blue screen after running my laptop for an hour... A problem has been detected and windows has been shut down to prevent damage to your computer. [...] Technical Information: *** STOP 0x0000008E (0xc0000005, 0x805B03F5, 0xF703DC7C, 0x00000000) [...] So how can I tell if this is faulty memory or some other hardware problem? My laptop is a Toshiba Satellite A45-S250.

    Read the article

  • Why the OS in VM always blue screen by chance ?

    - by Foolish
    it always has this error :driver_irql_not_less_or_equal And as i searched over the internet, I found it might because of the bridged network card problem, it would be OK if i changed to NAT.(but I am not sure) And after I reduce the memory allocated to the VM, the error didn't occurs till now Is there any solution?

    Read the article

  • How to use the 4-in-1 card reader on my Lenovo x100e?

    - by Thomas Padron-McCarthy
    My Lenovo x100e laptop has a "4-in-1" card reader that's supposed to handle SD/SDHC, MMC, Memory Stick and MS Pro, but I can't insert my SDHC card (a "SANDISK SECURE DIGITAL EXTREME SDHC 16GB 30MB/S"). It enters a bit and looks lite it will fit, but then it doesn't get any further in (and yes, I've tried to turn it around). It really doesn't move, and I'm afraid to break something if I push harder. Am I missing something obvious here?

    Read the article

  • System restarting without warning

    - by doug
    I was running Windows 7 and from time to time it shutdown with no reason. I was thinking that it might be my fault, because I was using an x86 OS on a Intel Core Duo system with 4GB RAM. I just downloaded Ubuntu x64 in order to do some memory tests. The system is closing itself during the tests. Which can be the reason? What can I do? ps: It is a laptop

    Read the article

  • Is there a difference between the actual chip intended for Dual Channel vs Triple Channel

    - by JimDel
    Is there a difference between the actual chips intended for Dual Channel vs Triple Channel. I bought a set of triple channel memory but I'm only using 2 of the 3 chips. I'm getting the error "Display driver NVIDIA Windows Kernel Mode Driver, Version 197.45 stopped responding and has successfully recovered" There seems to be a TON of discussion on the web about this and some say it might be RAM related. This is the ram I'm using. Thanks

    Read the article

  • Does more RAM on Mac really improve performance?

    - by Moshe
    I'm coming from a PC, loaded with a Core 2 Quad CPU and 8GB of DDR2 RAM. I was running Premiere CS3. I'm new to Mac so I'm not sure if this will help performance: Will increasing my 21.5" Core 2 Duo iMac's memory from 4GB (DDR3) to 8GB improve performance of Premiere CS4 significantly? I am not impressed with Premiere as it is now. The iMac is the newest one as of this post.

    Read the article

  • DIMMs: Single vs. Double vs. Quad Rank

    - by MikeyB
    What difference does the 'Rank' of DIMMs make to server memory? For example, when looking at server configurations I see the following being offered for the same server: 2GB (1x2GB) Single Rank PC3-10600 CL9 ECC DDR3-1333 VLP RDIMM 2GB (1x2GB) Dual Rank PC3-10600 CL9 ECC DDR3-1333 VLP RDIMM Given the option of Single Rank vs. Dual Rank or Dual Rank vs. Quad Rank is one always: Faster? Cheaper? Higher Bandwidth?

    Read the article

  • Need for page file with 12 GB RAM

    - by MartinStettner
    Hi, I recently got my new PC with 12 GB RAM (running Windows 7 64bit). The default installation suggests a 12 GB page file on the system drive (which I think is both inefficient and expensive on a SSD drive...) I'm wondering if I need any virtual memory at all, 12 GB being more than I had on my previous machine including the page file (I had 3GB RAM + 3GB pagefile). Thanks Martin EDIT As mokubai pointed out, the question is pretty much answered in Windows 7 pagefile size with large RAM and SSD

    Read the article

  • power equation for RAM

    - by kashyapa
    How is the dynamic power consumption of memory determined . Can anybody give a canonical equation for power consumption of the RAM. What are the parameters involved in determing the dynamic power consumption of RAM ? Thanks in advance

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >