memory

GetProcessMemoryInfo PROCESS_MEMORY_COUNTERS_EX.PrivateUsage always 0

丶灬走出姿态 提交于 2021-02-07 14:23:50
问题 I'm using GetProcessMemoryInfo function to determine process memory usage by its PID. With regular PROCESS_MEMORY_COUNTERS all works fine, but I need PrivateUsage member, that exists only in extended structure PROCESS_MEMORY_COUNTERS_EX. There are couple of docs, that moved me to forcefully cast extended type to a basic one, otherwise my sample wont compile. I'm still able to get value from basic members, such as PeakWorkingSetSize, but PrivateUsage is always 0. I've even tried to redefine

How Much Memory Can I Allocate?

狂风中的少年 提交于 2021-02-07 14:21:59
问题 If I have 16 GB of RAM on my machine, how much can I allocate to a java command line program I'm executing? I assume java -Xmx 16g... will crash my system? EDIT: In light of the comments, I tried java -Xmx16g... , and it did not crash my machine. The program still ran out of memory. I tried java -Xmx32g... , which did crash my machine. From the comments below (which have been really enlightening), I guess I just need to keep playing around with the allocations. 回答1: The size the heap memory

GetProcessMemoryInfo PROCESS_MEMORY_COUNTERS_EX.PrivateUsage always 0

為{幸葍}努か 提交于 2021-02-07 14:21:05
问题 I'm using GetProcessMemoryInfo function to determine process memory usage by its PID. With regular PROCESS_MEMORY_COUNTERS all works fine, but I need PrivateUsage member, that exists only in extended structure PROCESS_MEMORY_COUNTERS_EX. There are couple of docs, that moved me to forcefully cast extended type to a basic one, otherwise my sample wont compile. I'm still able to get value from basic members, such as PeakWorkingSetSize, but PrivateUsage is always 0. I've even tried to redefine

C (or asm): how to execute c code stored in memory (copied from labels)

♀尐吖头ヾ 提交于 2021-02-07 13:12:59
问题 I try to "inline" my VM by copying code segments from C code between labels to memory allocated by malloc. So I have Ops defined with start and end labels, and I want to copy the instruction defined by the following code to a buffer and then get executed (Im not sure if this is even possible) OP_PUSH0_START: sp += 4; *sp = 0; // I WANT THE INSTRUCTIONS OF THIS LINE COPIED TO THE BUFFER OP_PUSH0_END: to do so I thought the following code snippet will work void * ptr0 = &&OP_PUSH0_START; void *

Is multi-thread memory access faster than single threaded memory access?

ぃ、小莉子 提交于 2021-02-07 12:19:38
问题 Is multi-thread memory access faster than single threaded memory access? Assume we are in C language. A simple example is as follows. If I have a gigantic array A and I want to copy A to array B with the same size as A . Is using multithreading to do memory copy faster than it with a single thread? How many threads are suitable to do this kind of memory operation? EDIT: Let me put the question more narrow. First of all, we do not consider the GPU case. The memory access optimization is very

IOSurface gradually increases memory in iOS 12 and above

馋奶兔 提交于 2021-02-07 11:58:17
问题 I am facing memory issue in my app for iOS 12 and above versions. IOSurface gradually increases simultaneously in iOS 12.1.1 where as it works fine in iOS 11 versions. I have attached the issue screenshot below, Why this issue happens in iOS 12 versions? Can someone help me how to solve this? I cross checked in iOS 11 versions and it works fine. 回答1: Do you use camera ? It may depends on camera. Size of IOSurface bock: 8372224 bytes = 1960*1080*4 来源: https://stackoverflow.com/questions

Memory leak with TensorFlow

蹲街弑〆低调 提交于 2021-02-07 11:24:46
问题 I have a memory leak with TensorFlow. I refered to Tensorflow : Memory leak even while closing Session? to address my issue, and I followed the advices of the answer, that seemed to have solved the problem. However it does not work here. In order to recreate the memory leak, I have created a simple example. First, I use this function (that I got here : How to get current CPU and RAM usage in Python?) to check the memory use of the python process : def memory(): import os import psutil pid =

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

元气小坏坏 提交于 2021-02-07 11:16:34
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

喜欢而已 提交于 2021-02-07 11:14:39
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI

Java memory leak, only Jenkins running, Jenkins .war analysis shows nothing strange

吃可爱长大的小学妹 提交于 2021-02-07 11:14:33
问题 I'm currently running Jenkins on a mac mini with Xmx2048m set and a permgen space of 512, I have the 'Monitoring' plugin running and it shows Jenkins using ~200M memory (spiking at 400 during archives). This number is slowly creeping up as you can see below. http://i.imgur.com/vTuIyTz.png When I look at the java process using 'top' on the mac mini it is showing the memory at about 685M. This number creeps up quicker and, eventually, hits 2048 and Jenkins bombs out. http://i.imgur.com/TojBjhI