Search Results

Search found 16731 results on 670 pages for 'memory limit'.

Page 109/670 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • Setting the first two bytes of a block of memory

    - by idealistikz
    Suppose I have a block of memory as such: void *block = malloc(sizeof(void *) + size); How do I set the first two bytes of the block as NULL or have it point somewhere? I do not want to simply assign 'block' to NULL or to another pointer because I want to access the rest of the memory I malloc'ed.

    Read the article

  • How to delete images from memory in a browser

    - by trefeater
    Hi all. Is it possible to delete some images from the browser (firefox2) memory using javascript? By doing this, I want to save some precious browser memory and let my web app to work better. I guess that if possible, it will be something like this: delete (document.images[7]); document.images[7].src = null; document.images[7] = null; Thanks guys!

    Read the article

  • Limit checkboxes with jquery based on checked radio buttons

    - by Hiskie
    So, i have this problem with some checkboxes. First of all let me tell you about the "project" itself. It's a webform, the user must complete it and check some checkboxes and radio buttons depending on what he would like to purchase. First of them are 2 radio bullets, numbered 1 and 2, and represent the quantity of the product he wants to purchase. Next to those are about 5 checkboxes that represent the color of the product, it doesn't matter how many of them are, the thing is ... i want, when a user selects 1 at the radio buttons, only 1 checkbox to be active, if he selects 2 then only 2 checkboxes to be available to check. So.. could someone help me? I thought of jQuery but i don't know... There are two divs, the first div with the id of let's say #radioButtons has 2 radio buttons, and the second div has the rest of the checkboxes.

    Read the article

  • Limit child rows in Entity Framework Query

    - by Jim
    Hi, If I have a parent and child modelled relationship. How to I select the parent, and some of the child rows. I cannot seem to do it, and load the parent object. var query = ( from parent in Parents.Include("Children") from child in parent.Children where child.Date == parent.Children.Max(x => x.Date) select parent); the problem is that the parent is returned multiple times, not the parent with the children loaded. Is there any way to populate each of the parents, and include the child rows, but only the ones needed. If I try and navigate again, I get all the children, not just the ones with the latest date. Thanks

    Read the article

  • MySQL: Limit output according to associated ID

    - by Jess
    So here's my situation. I have a books table and authors table. An author can have many books... In my authors page view, the user (logged in) can click an author in a tabled row and be directed to a page displaying the author's books (collected like this URI format: viewauthorbooks.php?author_id=23), very straight forward... However, in my query, I need to display the books for the author only, and not all books stored in the books table (as i currently have!) As I am a complete novice, I used the most simple query of: SELECT * FROM tasks_tb This returns the books for me, but returns every single value (book) in the database, and not ones associated with the selected author. And when I click a different author the same books are displayed for them...I think everyone gets what I'm trying to achieve, I just don't know how to perform the query. I'm guessing that I need to start using more advanced query clauses like INNER JOIN etc. Anyone care to help me out :)

    Read the article

  • lock-free memory reclamation with 64bit pointers

    - by JDonner
    Herlihy and Shavit's book (The Art of Multiprocessor Programming) solution to memory reclamation uses Java's AtomicStampedReference<T>;. To write one in C++ for the x86_64 I imagine requires at least a 12 byte swap operation - 8 for a 64bit pointer and 4 for the int. Is there x86 hardware support for this and if not, any pointers on how to do wait-free memory reclamation without it?

    Read the article

  • Is it better to cut and store all sprites needed from a spritesheet in memory, or cut them out just-in-time?

    - by xLite
    I'm not sure what's best practice here as I have little experience with this. Essentially what I am asking is... if it's better to get your single PNG with all your different sprites on it for use in-game, cut out every sprite on startup and store them in memory, then access the already-cut-out sprite from memory quickly or Only have the single PNG with all the different sprites residing in memory, and when you need, for example, a tree. You cut out the tree from the PNG and then continue to use it as normal. I imagine the former is more CPU friendly than the latter but less memory friendly, vice versa for the latter. I want to know what the norm is for game dev. This is a pixel based game using 2D art. Each PNG is actually an avatar's sprite sheet with each body part separated and then later joined to form the full body of the avatar.

    Read the article

  • kvm process has too large a memory footprint on host

    - by gucki
    I'm using latest ubuntu quantal and start a kvm guest which should have 2048 MB of memory. Now after a few hours I can see that the kvm process of this guest is around 2700 MB, so 700 MB more than the guest should be able to consume. I mean a small overhead like 1% would be ok, but not 30%?! root 8631 74.0 22.2 4767484 2752336 ? Sl Nov07 512:58 kvm -cpu kvm64 -smp sockets=1,cores=2 -cpu kvm64 -m 2048 -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -drive file=rbd:data/vm-disk-1,if=none,id=drive-virtio0,cache=writeback,aio=native -device virtio-net-pci,netdev=net0,bus=pci.0,addr=0x12,id=net0,mac=02:7a:86:e6:1a:6c,bootindex=200 -netdev type=tap,id=net0,vhost=on -usbdevice tablet -nodefaults -enable-kvm -daemonize -boot menu=on -vga cirrus root 8694 0.0 0.0 0 0 ? S Nov07 0:00 [kvm-pit/8631] How is this possible and how to prevent it?

    Read the article

  • Store password temporarily in memory

    - by Nils
    Hello, I'm looking for a way in an Android application to store a password within the memory as long as the application is running (cf. different activities). I was first thinking about the SharedPreferences, but then it's saved in the flash memory, which isn't that good for a password, I guess. I'm unsure, what's the best way. What would you recommend me?

    Read the article

  • How to keep program always in memory (no swapping)

    - by Yossarian
    I'm using KeePass (on Windows 7) for storing passwords. The application is running on my laptop almost 100% of the time, but I'm using it rarely. The problem is, that activating the window after long time takes huge amount of time, I'd say that OS realized the application is no longer used and swapped it. I don't want OS to swap my KeePass (because of the loading lag, and also because of security - I don't like the idea of password keeping program's memory to be stored anywhere on HDD). Is there any possibility how to tell OS not to swap some program? Or, is this achievable by some programming?

    Read the article

  • Limit Apache to 1 request per process

    - by Gorilla3D
    I have a few long running processes on apache and when the server gets a bit of a load they all seem to couple into 3-4 processes. I've tried setting the MaxRequestsPerChild to 1 and that works, but spawning new processes all the time is expensive. Here is my current configuration: <IfModule prefork.c> StartServers 25 MinSpareServers 50 MaxSpareServers 50 ServerLimit 512 MaxClients 50 MaxRequestsPerChild 10 </IfModule> <IfModule worker.c> StartServers 25 MaxClients 50 MinSpareThreads 50 MaxSpareThreads 125 ThreadsPerChild 50 MaxRequestsPerChild 10 </IfModule>

    Read the article

  • Memory leaking issue iPhone

    - by milanjansari
    Hello, Anyone have a idea about solve memory leak issues i have found one memory related issue NSAutoreleaseNoPool(): Object 0x3588aea0 of class NSCFString autoreleased with no pool in place - just leaking can anyone have a idea about how can i solve.. Thnak you

    Read the article

  • Limit to 10 number of annotations in mapkit!

    - by teddafan
    Hi, I have all my annotations(as nsdictionnaries) in an array , and the users add them one by one by tapping on an icon. I want to make it impossible after adding 10 annotations (there is 110). Is it here i have to make something?: -(IBAction) plusButtonTapped: (id) sender { NSDictionary *poiDict = [poiArray objectAtIndex:nextPoiIndex++]; CLLocationCoordinate2D poiCoordinate; poiCoordinate.latitude = [[poiDict valueForKey:@"workingCoordinate.latitude"] doubleValue]; poiCoordinate.longitude = [[poiDict valueForKey:@"workingCoordinate.longitude"] doubleValue]; MyMapAnnotation *poiAnnotation = [[MyMapAnnotation alloc] initWithCoordinate:poiCoordinate title:[poiDict valueForKey:@"Subtitle"] color:MKPinAnnotationColorRed ]; [mapView addAnnotation:poiAnnotation]; [self adjustMapZoom]; } Thank you for your help in advance, teddafan

    Read the article

  • What is GC holes?

    - by tianyi
    I wrote a long TCP connection socket server in C#. Spike in memory in my server happens. I used dotNet Memory Profiler(a tool) to detect where the memory leaks. Memory Profiler indicates the private heap is huge, and the memory is something like below(the number is not real,what I want to show is the GC0 and GC2's Holes are very very huge, the data size is normal): Managed heaps - 1,500,000KB Normal heap - 1400,000KB Generation #0 - 600,000KB Data - 100,000KB "Holes" - 500,000KB Generation #1 - xxKB Data - 0KB "Holes" - xKB Generation #2 - xxxxxxxxxxxxxKB Data - 100,000KB "Holes" - 700,000KB Large heap - 131072KB Large heap - 83KB Overhead/unused - 130989KB Overhead - 0KB Howerver, what is GC hole? I read an article about the hole: http://kaushalp.blogspot.com/2007/04/what-is-gc-hole-and-how-to-create-gc.html The author said : The code snippet below is the simplest way to introduce a GC hole into the system. //OBJECTREF is a typedef for Object*. { PointerTable *pTBL = o_pObjectClass->GetPointerTable(); OBJECTREF aObj = AllocateObjectMemory(pTBL); OBJECTREF bObj = AllocateObjectMemory(pTBL); //WRONG!!! “aObj” may point to garbage if the second //“AllocateObjectMemory” triggered a GC. DoSomething (aOb, bObj); } All it does is allocate two managed objects, and then does something with them both. This code compiles fine, and if you run simple pre-checkin tests, it will probably “work.” But this code will crash eventually. Why? If the second call to “AllocateObjectMemory” triggers a GC, that GC discards the object instance you just assigned to “aObj”. This code, like all C++ code inside the CLR, is compiled by a non-managed compiler and the GC cannot know that “aObj” holds a root reference to an object you want kept live. ======================================================================== I can't understand what he explained. Does the sample mean aObj becomes a wild pointer after GC? Is it mean { aObj = (*aObj)malloc(sizeof(object)); free(aObj); function(aObj);? } ? I hope somebody can explain it.

    Read the article

  • Limit a double to two decimal places

    - by Jacob
    How do I achieve the following conversion from double to a string: 1.4324 => "1.43" 9.4000 => "9.4" 43.000 => "43" ie I want to round to to decimal places but dont want any trailing zeros, ie i dont want 9.4 => "9.40" (wrong) 43.000 => "43.00" (wrong) So this code which I have now doesn't work as it displays excess twos: [NSString stringWithFormat: @"%.2f", total]

    Read the article

  • Memory Allocation by STL C++ Objects

    - by Vaibhav
    I am using malloc_stats() function to display the amount of "system bytes" and "in use" bytes used by the process. I wanted to know if the in use bytes also include the memory used by STL C++ Objects like map, vector, sets? If yes, is it safe to assume that this is only amount of memory that will be used by the process?

    Read the article

  • Android googlemap Out of memory

    - by Xiaofeng
    Hi, I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often. I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory". How to save memmory usage in a googlemap api, or how to enlarge android api memmory limit. Thanks a lot!

    Read the article

  • Passenger/Rails not releasing memory

    - by michaeldelorenzo
    I have an Ubuntu server running three separate Rails (2.3.8) applications with Passenger, REE and Apache. Recently we started experiencing problems with ruby processes eating up memory and consuming entire cores on our server. Here's what we're getting... %CPU PID USER COMMAND 99.9 1717 nobody Rails: /var/www/api 99.6 5542 nobody Rails: /var/www/api 97.3 1223 nobody Rails: /var/www/api 4.7 5537 nobody Passenger ApplicationSpawner: /var/www/api 10.5 1801 nobody Rails: /var/www/api We've also seen instances where there have been over 100 instances of Apache running. These applications have been running for a few months without an of these issues, but in the last day or so we've been noticing this. The site referenced here is a Rails application that is a RESTful API so it serves many requests every minute. Any guidance on what we should be checking or looking out for would be appreciated.

    Read the article

  • How to limit select items with L2E/S?

    - by orlon
    This code is a no-go var errors = (from error in db.ELMAH_Error select new { error.Application, error.Host, error.Type, error.Source, error.Message, error.User, error.StatusCode, error.TimeUtc }).ToList(); return View(errors); as it results in a 'requires a model of type IEnumerable' error. The following code of course works fine, but selects all the columns, some of which I'm simply not interested in: var errors = (from error in db.ELMAH_Error select error).ToList(); return View(errors); I'm brand spanking new to MVC2 + L2E, so maybe I'm just not thinking in the right mindset yet, but this seems counter-intuitive. Is there an easy way to select a limited number of columns, or is this just part of using an ORM?

    Read the article

  • Clearing Windows file share "memory"

    - by Tom Shaw
    I'm currently upgrading a Samba file server (from 3.0.23d to 3.4.3). I have a problem on the Windows client side: if the client was accessing a UNC path or mapped drive from the Samba server before the upgrade, then after the upgrade those paths or drives are not accessible. However, I can consistently resolve the client side problem for good by rebooting the client and then re-mapping all of the mapped drives. The problem appears to be related to the client's "memory" of the pre-upgrade Samba server, which the reboot and re-map clears. I have the same issue and same fix on Windows XP SP3 and Windows Server 2003 SP2. This question is specifically: is it possible to reproduce the benefits of the Windows reboot without actually rebooting the client? I have tried restarting various Windows services, disabling and enabling the network, logging out and back in again, but nothing except a reboot appears to do the trick.

    Read the article

  • get-wmiobject sql join in powershell - trying to find physical memory vs. virtual memory of remote s

    - by Willy
    get-wmiobject -query "Select TotalPhysicalMemory from Win32_LogicalMemoryConfiguration" -computer COMPUTERNAME output.csv get-wmiobject -query "Select TotalPageFileSpace from Win32_LogicalMemoryConfiguration" -computer COMPUTERNAME output.csv I am trying to complete this script with an output as such: Computer Physical Memory Virtual Memory server1 4096mb 8000mb server2 2048mb 4000mb

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >