Search Results

Search found 12588 results on 504 pages for 'memory allocation'.

Page 31/504 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Allocating memory for a array to char pointer

    - by nunos
    The following piece of code gives a segmentation fault when allocating memory for the last arg. What am I doing wrong? Thanks. int n_args = 0, i = 0; while (line[i] != '\0') { if (isspace(line[i++])) n_args++; } for (i = 0; i < n_args; i++) command = malloc (n_args * sizeof(char*)); char* arg = NULL; arg = strtok(line, " \n"); while (arg != NULL) { arg = strtok(NULL, " \n"); command[i] = malloc ( (strlen(arg)+1) * sizeof(char) ); strcpy(command[i], arg); i++; } Thanks.

    Read the article

  • Effect of suffixes in memory operations

    - by tur1ng
    In x86 GNU Assembler there are different suffixes for memory related operations. E.g.: movb, movs, movw, movl, movq, movt(?) Now my question is the following: Does the suffix has ANY effect on how the processor is getting the data out of main memory or will always be one or more 32-bit (x86) chunks loaded into the cache ? What are the effects beside the memory access?

    Read the article

  • Deleting Part of An Array in Java to Free Memory on Heap

    - by kate
    I am implementing a dynamic programming algorithm for the knapsack problem in Java. I declare the array and then initialize its size to be [number of objects][capacity of knapsack]. When my number of objects or my capacity gets too large, I get a memory error because I run out of space on the heap. My questions is: If I delete rows from my double array as I go along, will Java free the memory as I delete? Or does Java reserve that memory space for the size of the array I originally created? If it's the latter, is there a way to manually free the memory in Java? Thanks for your Help!

    Read the article

  • Large number of tables and Hibernate memory consumption

    - by Vedran
    I'm working on a large ERP project which has database model with about 2100 tables. With "only" 500 tables mapped with Hibernate, application deployed on the web server takes about 3GB of working memory. Is there any way to reduce Hibernate's metamodel memory footprint when using that many tables in one persistence unit? Or should I just give up on ORMs and go with plain old JDBC (or even jOOQ)? Right now I'm using Hibernate 4.1.8, Spring 3.1.3, JBoss AS 7.1 and working with MSSQL database. Edit: JavaMelody memory histogram output - with 2000 generated test tables that are a bit smaller in scope from the original db model (hence 'only' 1.3GB of spent memory)

    Read the article

  • Handling out of memory errors in iPhone

    - by hgpc
    I would like to handle out of memory errors in iPhone to execute logic with lesser memory requirements in case I run of of memory. In particular, I would like to do something very similar to the followin pseudo-code: UIImage* image; try { image = [UIImage imageNamed:@"high_quality_image.png"]; } catch (OutOfMemoryException e) { image = [UIImage imageNamed:@"low_quality_image.jpg"]; } First I attempt to load a high-quality image, and if I run out of memory while doing it, then I use a lower quality image. Would this be possible?

    Read the article

  • strategy to allocate/free lots of small objects

    - by aaa
    hello I am toying with certain caching algorithm, which is challenging somewhat. Basically, it needs to allocate lots of small objects (double arrays, < 256 elements), with objects accessible through mapped value, map[key] = array. time to initialized array may be quite large, generally more than 10 thousand cpu cycles. By lots I mean around gigabyte in total. objects may need to be popped/pushed as needed, generally in random places, one object at a time. lifetime of an object is generally long, minutes or more, however, object may be subject to allocation/deallocation several times during duration of program. What would be good strategy to avoid memory fragmentation, while still maintaining reasonable allocate deallocate speed? I am using C++, so I can use new and malloc. Thanks. I know there a similar questions on website, http://stackoverflow.com/questions/2156745/efficiently-allocating-many-short-lived-small-objects, are somewhat different, thread safety is not immediate issue for me.

    Read the article

  • Google Chrome && (cache || memory leaks).

    - by Alexey Ogarkov
    Hello All, I have a big problem with Google Chrome and its memory. My app is displaying to user several image charts and reloads them every 10s. In the interval i have code like that var image = new Image(); var src = 'myurl/image'+new Date().getTime(); image.onload = function() { document.getElementById('myimage').src = src; image.onload = image.onabort = image.onerror = null; } image.src = src; So i have no memory leaks in Firefox and IE. Here the response headers for images Server Apache-Coyote/1.1 Vary * Cache-Control no-store (// I try no-cache, must-revalidate and so on here) Content-Type image/png Content-Length 11131 Date Mon, 31 May 2010 14:00:28 GMT Vary * taken from here In about:cache page there is no my cached images. If i enable purge-memory-button for chrome (--purge-memory-button parameter) it`s not help. Images is in PNG24. So i think that the problem is not in cache. May be Google Chrome is not releasing memory for old images. Please help. Any suggestions. Thanks.

    Read the article

  • iPhone real memory climbs when interacting with UI

    - by Scott Gress
    I've been using the Activity Monitor to check the memory usage of my iPhone apps. I've noticed that the Real Memory climbs whenever I interact with the UI in any way, even if there's no code being called. For example, I can create a brand new View-Based application and run it, and as I click or drag in the empty window the Real Memory increases even though the app isn't responding in any way. I get that the view controller is doing some stuff in the background to interpret my interactions, but it seems like the memory should go back down after a second or so. Instead, it keeps going up and up and up as long as I keep clicking or dragging. I can wait forever and it never decreases. This is a little disturbing. Am I missing something?

    Read the article

  • How to find out where my memory is going

    - by the_mandrill
    I've got the situation where the cycle of loading and then closing a document eats up a few Mb of RAM. This memory isn't being leaked as something owns it and cleans it up when the app exits (Visual Leak Detector and the Mac Leaks tool show agreement on this). However, I'd like to find out where it's going. I'm assuming it's some sort of cache in the application that gets populated when the document loads but not freed when the document is closed. Which methods or tools could I use to find out where these allocations are being made?

    Read the article

  • How to avoid reallocation using the STL (C++)

    - by Tue Christensen
    This question is derived of the topic: http://stackoverflow.com/questions/2280655/vector-reserve-c I am using a datastructur of the type vector<vector<vector<double> > >. It is not possible to know the size of each of these vector (except the outer one) before items (doubles) are added. I can get an approximate size (upper bound) on the number of items in each "dimension". A solution with the shared pointers might be the way to go, but I would like to try a solution where the vector<vector<vector<double> > > simply has .reserve()'ed enough space (or in some other way has allocated enough memory). Will A.reserve(500) (assumming 500 is the size or, alternatively an upper bound on the size) be enough to hold "2D" vectors of large size, say [1000][10000]? The reason for my question is mainly because I cannot see any way of reasonably estimating the size of the interior of A at the time of .reserve(500). An example of my question: vector A; A.reserve(500+1); vector temp2; vector temp1 (666,666); for(int i=0;i<500;i++) { A.push_back(temp2); for(int j=0; j< 10000;j++) { A.back().push_back(temp1); } } Will this ensure that no reallocation is done for A? If temp2.reserve(100000) and temp1.reserve(1000) where added at creation will this ensure no reallocation at all will occur at all? In the above please disregard the fact that memory could be wasted due to conservative .reserve() calls. Thank you all in advance!

    Read the article

  • x86_64 and memory issues

    - by Valery
    Recently I've switched from ubuntu 32bit to 64bit version. And now I experiencing some problems. All application take twice more memory. And some application takes even more. For example sshd on new server: root 6608 0.0 0.0 67972 2912 ? Ss 14:43 0:00 sshd: deploy [priv] deploy 6616 0.0 0.0 67972 1724 ? S 14:43 0:00 sshd: deploy@pts/4 root 20892 0.0 0.0 50916 1160 ? Ss 15:53 0:00 /usr/sbin/sshd root 21170 0.0 0.0 67972 2912 ? Ss 15:56 0:00 sshd: deploy [priv] deploy 21173 0.0 0.0 67972 1728 ? S 15:56 0:00 sshd: deploy@pts/0 root 23802 0.0 0.0 67972 2912 ? Ss 16:08 0:00 sshd: deploy [priv] deploy 23804 0.0 0.0 67972 1724 ? S 16:08 0:00 sshd: deploy@pts/1 root 24570 0.0 0.0 67972 2908 ? Ss 12:45 0:00 sshd: deploy [priv] deploy 24573 0.0 0.0 68112 1804 ? S 12:45 0:00 sshd: deploy@pts/3 deploy 25014 0.0 0.0 5168 852 pts/0 S+ 16:13 0:00 grep ssh the same on the old server: root 4867 0.0 0.0 5312 1028 ? Ss Mar23 0:00 /usr/sbin/sshd root 23753 0.0 0.0 8052 2556 ? Ss 16:15 0:00 sshd: deploy [priv] deploy 23755 0.0 0.0 8052 1524 ? S 16:15 0:00 sshd: deploy@pts/0 deploy 23770 0.0 0.0 3004 748 pts/0 D+ 16:15 0:00 grep ssh The same problems with postfix, nginx and some other application.

    Read the article

  • OC'ing a Sapphire 7950, problems with memory clock

    - by Cliff
    I bought a new rig with sapphire radeon 7950 flex w/ boost. Good scores initially in 3dmark 11, around 7300 stock. Problem is, as soon as i start overclocking, issues arise. the core clock is at 860, but rises to 925 with boost applied in pressured situations. So all the OC tools are showing 925 as base clock for some reason. Ocing the core clock has been no problem though, got up to 1200 pretty stable, but only an incremental increase in 3dmark 11, to 7600 from 7300, which is worrying. The real trouble starts when i start touching the memory clock. As soon as i touch it even by 1 point up to 1251mhz, the performance goes way down. suddenly i score under 5000 graphics in 3dmark11, no matter if its 1251hz or 1500hz. Ive tried adjusting every other parameter, different tools (sapphiretrixx, catalyst, afterburner) all still the same. Tried upping the power, still same. Where is the issue here?

    Read the article

  • Memory modules not running at rated speeds.

    - by Wesley
    Hi all, I'm having some odd memory issues with my build. Here are my specs right now: QDI Superb 4 motherboard Intel Pentium 4 Northwood 2.4GHz (512KB L2, 533MHz FSB) 3x 256MB PC2100 DDR266 RAM 16MB NVIDIA TNT2 Pro AGP Seagate 80GB IDE HDD Generic USB 2.0 PCI Generic Modem PCI Bestec 250W PSU To be even more specific, here are the current brands and models of each module: Kingston KVR266X64C25/256 Samsung PC2100U-25331-Z SMART SM5643285D4N0CHM0H Supposedly, they are all PC2100 266MHz modules with a latency of 2.5. Looking in Speccy, the Kingston module is somehow running at a speed of PC2300 ~284MHz. I've never overclocked RAM at all as I don't know how to. However, when I first started the computer, I had the SMART module in place first and then reset the BIOS settings, including the integrated overclocking options. However, this still doesn't explain why the Kingston module runs at a higher speed than the SMART and Samsung module. Why is it like this? On a side note, where could I find the motherboard manual for the QDI Superb 4? Thanks in advance.

    Read the article

  • Restoring MBR, partition table, and boot sector of memory card without data loss ("USBC")

    - by Synetech
    Abstract I have a FAT32 memory card that when inserted into a computer causes Windows to prompt to format it. The card is definitely not supposed to be blank and has a bunch of files on it. Symptoms Using a hex-editor/disk-viewer, I examined the card and found that several sectors/clusters have been overwritten with something that has a signature of USBC at the start of the sector. Specifically, the master boot record (and partition table) is gone (hence Windows thinking the card is blank and needing to be formatted), as are the boot sectors (they have the USBC signature and a volume label of NO NAME and partition type of FAT32). Fortunately, it looks like both copies of the FAT are almost entirely intact (a few FAT entries at the start of a cluster here and there seem to be overwritten by USBC). The root directory is also nearly intact—I can see the volume label entry and subdirectory listings, but one sector is overwritten. (There are no more instances of USBC after the last one in the FAT2.) Hypothesis These observations seem to indicate some sort of virus that erases a few key filesystem structures, and then overwrites a few extra sectors here and there. Googling it seems to corroborate the idea of a virus, except that others report a file called USBC which does not apply here, and in fact, could not be possible since there is no filesystem to even see files. I cannot find any information about a virus with these symptoms, nor a removal tool. (I can't help but wonder if it is actually due to an autorun virus prevention tool.) Question I can likely fix the FAT corruption since they are mostly contiguous chains and maybe even the lost sector of the root directory, but does anyone know of a convenient way to restore or (re)create the MBR/partition table and boot sectors (without formatting or overwriting the data)?

    Read the article

  • Out of memory errors but not actually out of memory...

    - by commradepolski
    So, myself and my fellow support techs have been fighting with this issue and we still dont know what the problem is. Lets start off with the system specs: Windows XP 32 bit Corporate (SP2 and SP3) Intel D975XBX2 Mobo 4gb of ram Intel Core 2 Quad Q6600 ATI Radeon HD 3600 - 512mb After a few hours of working on the machine, the end user will begin to see the following symptoms: Out of memory messages Title bars and menus dont draw in properly Problems accessing network resources Problems opening up documents such as MSWord and MSPowerpoint and text files Problems opening up explorer windows General instability We have looked at task manager while this issue was occurring, and all indicators, like PF usage, threads, handles, etc. are normal. We have been having trouble pinpointing the root cause of this issue. It is also not situated with one user, it affects 8-10. So far we have tried: Resetting CMOS (Waiting to see results) Replacing video card (didnt help) Windows updates (didnt help) Updating network drivers (didnt help) Switching user from 1gbps to 100mbps network connection (awaiting results) Swapping the affected user's hardware (waiting for results) Increasing desktop heap size (helped for a bit but then the issue became more frequent) Applying the /3 switch to XP (didnt help) Increasing and decreasing and setting PF to system managed state (didnt help) We did have a power outage at the office a couple weeks ago, and all these issues became more frequent. Prior to the power outage it may take a week or so for the users to experience the issues but since the power outage it takes 3-4 hours or less. We havent had reports of the above issues causing BSODs, although that would be easier to diagnose :). Any help is greatly appreciated.

    Read the article

  • Plesk Uninstall Memory issue

    - by user115079
    I am trying to uninstall plesk from my VPS by running following command: yum remove sw-* psa-* plesk-* when i run this command i get following error: Running rpm_check_debug Running Transaction Test memory alloc (4 bytes) returned NULL. First time when i run above command, this mem alloc (4 bytes) was very big number like (67864987). then i googled it, got some clear/ulimit commands. executed them. rebooted my system. stopped all process and executed this command again. but still getting 4 byte issue. dont know how to get rid of it. I also tried ulimit after reboot but no success and Yes. No swap attached. these are stats of my system [root@vps ~]# free -m total used free shared buffers cached Mem: 384 67 316 0 0 0 -/+ buffers/cache: 67 316 Swap: 0 0 0 top - 21:01:07 up 3:12, 1 user, load average: 0.24, 0.08, 0.03 Tasks: 31 total, 2 running, 29 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 393216k total, 69832k used, 323384k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached is there any other alternative to achieve my goal to uninstall plesk? thanks.

    Read the article

  • memory usage setting

    - by user127610
    everybody,the memory usage is too much,what can i do? top - 12:54:37 up 7 days, 4:38, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 18 total, 2 running, 16 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1048800k total, 917424k used, 131376k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 15 0 2840 1364 1204 S 0.0 0.1 0:02.17 init 1161 root 14 -4 2320 600 420 S 0.0 0.1 0:00.00 udevd 1391 root 18 0 35512 1288 948 S 0.0 0.1 0:03.53 rsyslogd 1409 root 15 0 8432 1164 700 S 0.0 0.1 0:03.87 sshd 1416 root 18 0 3156 868 692 S 0.0 0.1 0:00.00 xinetd 1423 root 18 0 8672 716 292 S 0.0 0.1 0:00.00 saslauthd 1424 root 18 0 8672 488 64 S 0.0 0.0 0:00.00 saslauthd 1431 root 15 0 7020 1168 616 S 0.0 0.1 0:00.99 crond 1450 root 25 0 6236 1444 1228 S 0.0 0.1 0:00.05 sh 3328 mysql 15 0 799m 42m 4892 S 0.0 4.1 0:02.07 mysqld 15479 root 15 0 11304 3332 2688 R 0.0 0.3 0:00.06 sshd 15482 root 15 0 6372 1688 1404 S 0.0 0.2 0:00.00 bash 15497 root 15 0 2536 1044 864 R 0.0 0.1 0:00.00 top 20137 www 15 0 20672 14m 864 S 0.0 1.4 0:00.87 nginx 22351 www 16 0 52324 26m 9244 S 0.0 2.6 0:13.94 php-fpm 24231 www 16 0 51928 25m 9260 S 0.0 2.5 0:13.52 php-fpm 32682 root 15 0 35832 3228 864 S 0.0 0.3 0:02.18 php-fpm 32686 root 18 0 7368 1616 888 S 0.0 0.2 0:00.00 nginx

    Read the article

  • Out of memory while iterating through rowset

    - by Phliplip
    Hi All, I have a "small" table of 60400 rows with zipcode data. I wan't to iterate through them all, update a column value, and then save it. The following is part of my Zipcodes model which extends My_Db_Table that a totalRows function that - you guessed it.. returns the total number of rows in the table (60400 rows) public function normalizeTable() { $this->getAdapter()->setProfiler(false); $totalRows = $this->totalRows(); $rowsPerQuery = 5; for($i = 0; $i < $totalRows; $i = $i + $rowsPerQuery) { $select = $this->select()->limit($i, $rowsPerQuery); $rowset = $this->fetchAll($select); foreach ($rowset as $row) { $row->{self::$normalCityColumn} = $row->normalize($row->{self::$cityColumn}); $row->save(); } unset($rowset); } } My rowClass contains a normalize function (basicly a metaphone wrapper doing some extra magic). At first i tried a plain old $this-fetchAll(), but got a out of memory (128MB) right away. Then i tried splitting the rowset into chunks, only difference is that some rows actually gets updated. Any ideas on how i can acomplish this, or should i fallback to ye'olde mysql_query()

    Read the article

  • PHP-FPM High Memory Usage

    - by Ruel
    I have a wordpress blog, that uses WP-SuperCache, and normally I get 100 visitors per day. With nginx + php-fpm it's blazing fast, and I have no regrets. One thing i noticed, php-fpm takes a lot of memory: top - 09:20:43 up 5 days, 15:53, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 26 total, 1 running, 25 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1048576k total, 329956k used, 718620k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 10226 www-data 15 0 145m 52m 4584 S 0.0 5.1 0:07.55 php-fpm 10223 www-data 16 0 141m 48m 4692 S 0.0 4.8 0:08.70 php-fpm 20277 www-data 15 0 138m 46m 4368 S 0.0 4.5 0:07.55 php-fpm 20259 www-data 15 0 133m 41m 4600 S 0.0 4.0 0:06.68 php-fpm 12201 www-data 15 0 133m 41m 4632 S 0.0 4.0 0:08.31 php-fpm 11586 www-data 15 0 132m 40m 4292 S 0.0 3.9 0:03.27 php-fpm 29822 www-data 15 0 128m 36m 4356 S 0.0 3.6 0:05.26 php-fpm 28427 mysql 15 0 200m 7300 4764 S 0.0 0.7 0:47.89 mysqld 10202 root 18 0 98.3m 4320 1204 S 0.0 0.4 0:03.80 php-fpm 22524 root 18 0 86064 3396 2652 S 0.0 0.3 0:16.74 sshd 9882 www-data 18 0 42052 2572 804 S 0.0 0.2 0:27.52 nginx 9884 www-data 18 0 42052 2560 804 S 0.0 0.2 0:26.26 nginx 9881 www-data 18 0 42064 2524 804 S 0.0 0.2 0:29.24 nginx 9879 www-data 18 0 42032 2480 804 S 0.0 0.2 0:29.58 nginx 23771 root 15 0 12176 1820 1316 S 0.0 0.2 0:00.08 bash 28344 root 22 0 11932 1416 1184 S 0.0 0.1 0:00.00 mysqld_safe 18167 root 16 0 62628 1208 648 S 0.0 0.1 0:00.55 sshd 25941 root 15 0 12612 1192 928 R 0.0 0.1 0:02.21 top 11573 root 15 0 20876 1168 592 S 0.0 0.1 0:00.67 crond 9878 root 18 0 41000 1112 284 S 0.0 0.1 0:00.00 nginx 21736 root 23 0 21648 936 716 S 0.0 0.1 0:00.00 xinetd 11585 root 18 0 46748 816 428 S 0.0 0.1 0:00.00 saslauthd 14125 root 12 -4 12768 768 452 S 0.0 0.1 0:00.00 udevd 1 root 18 0 10352 728 616 S 0.0 0.1 0:17.93 init 24564 root 15 0 5912 680 544 S 0.0 0.1 0:01.90 syslogd 11618 root 18 0 46748 548 160 S 0.0 0.1 0:00.00 saslauthd Here's my php-fpm config: [global] pid = run/php-fpm.pid error_log = log/php-fpm.log log_level = notice [www] listen = 127.0.0.1:9000 user = www-data group = www-data pm = dynamic pm.max_children = 50 pm.start_servers = 3 pm.min_spare_servers = 3 pm.max_spare_servers = 10 pm.max_requests = 500 Sometimes it goes up to 400MB. And I'm planning to add a new website on my VPS. Is this normal?

    Read the article

  • Single TCP-CLOSE_WAIT connection brings down application till restart

    - by broun
    Recently found a behaviour where my application had a connection in TCP Close_wait state till the app was restarted (after about 5 hours). But during this period the SUnreclaim space was also increasing constantly and went down on restart. The application is runnning on a rhel5 os and Im not very familiar with the memory management system. Would appreciate if someone clould tell me what extactly is the Ureclaim space and why it is increasing in sync with the close_wait.

    Read the article

  • SUnreclaim size increasing in syc with a TCP-CLOSE_WAIT till application restart

    - by maver1k
    Recently found a behaviour where my application had a connection in TCP Close_wait state till the app was restarted (after about 5 hours). But during this period the SUnreclaim space was also increasing constantly and went down on restart. The application is runnning on a rhel5 os and Im not very familiar with the memory management system. Would appreciate if someone clould tell me what extactly is the Ureclaim space and why it is increasing in sync with the close_wait. Thanks.

    Read the article

  • How can I limit Safari's RAM use?

    - by timothymh
    Safari uses a lot of RAM. Especially when you add Safari's use to WebProcess's use: it comes to about 1.5 GB of memory (for me, anyway). How can I limit the amount of RAM Safari and WebProcess use? I know a similar question was asked last summer, but two of those answers have to do with the program in question (Dropbox) and the other answer encourages use of Terminal, which I find terribly confusing. Are there any other methods?

    Read the article

  • Ubuntu 14.04 says insufficient memory in my /boot memory alocation while updating

    - by Aravind Dollar
    I am new to Linux platform. I just tried installing Ubuntu alongside windows but allocated only 200 mb to the /boot partition which is not recommended. Now Ubuntu software update keep on insists me no enough space. What should I do? Is there any way to increase my /boot partition without removing the total OS? Or should I completely uninstall Ubuntu and put it back? Please anyone suggest me over this issue. I have no idea what to do. And please be elaborate, as I am new to Linux environment.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >