ram

Temp file that exists only in RAM?

大兔子大兔子 提交于 2019-12-11 01:56:03
问题 I'm trying to write an encrpytion using the OTP method. In keeping with the security theories I need the plain text documents to be stored only in memory and never ever written to a physical drive. The tmpnam command appears to be what I need, but from what I can see it saves the file on the disk and not the RAM. Using C++ is there any (platform independent) method that allows a file to exist only in RAM? I would like to avoid using a RAM disk method if possible. Thanks Edit: Thanks, its more

how to find out the RAM and GPU information of my visitors?

為{幸葍}努か 提交于 2019-12-11 00:28:09
问题 I want to know how much RAM my visitors have and all the information available about their GPU. Is there any way to achieve this via JavaScript or maybe ActionScript (Flash)? 回答1: JavaScript, Browser extensions and Plugins are heavily sandboxed that they have limited, to no access to the system for security purposes. Only limited hardware can be accessed directly (with the user's consent), like camera and microphone for JavaScript's getUserMedia or Flash. The nearest you can get is to have

How to allocate memory in a specific place in memory (C programming)?

一个人想着一个人 提交于 2019-12-10 21:34:33
问题 I have a server with 2 CPUs, each with 6 cores. Each of the CPUs are connected to 4 GB of RAM. I have a parallel program that runs the same code (with minor changes) in both CPUs in parallel, using 4 threads in each core. For efficiency reasons, it would be best if there was a way to ensure that the code running on CPU 1 would only allocate memory on its corresponding ram and not on the ram of CPU 2, and vice versa, as the communication between CPUs would create an overhead. Is there any way

How to get TOTAL memory and internal storage size Android?

旧时模样 提交于 2019-12-10 18:46:39
问题 I'm attempting to get the total memory (RAM) and internal storage size, but every method I have used is reporting it too low. I'm aware the kernel may take up some of it but I need to know how much there is installed in total. For the memory I first just read from /proc/meminfo/ then used the getMemoryInfo . Each of these reported less than the amount of memory installed (700MB instead of 1GB). for the internal storage size I am using Environment.getDataDirectory , getBlockSizeLong and

HOW do I write from a Spartan6 to the Micron external Cellular RAM on the Nexys3 FPGA Board?

本小妞迷上赌 提交于 2019-12-10 16:38:30
问题 I have looked everywhere, the datasheet, the Xilinx website, digilent, etc. etc. and can't find anything! I was able to use the Adept tool to verify that my Cellular RAM is functioning correctly, but I just can't find any stock VHDL code as a controller to write data to and read data from it!! Help!! 回答1: Found this link but it's for asynchronous mode, which is not nearly fast enough: http://embsi.blogspot.com/2013/01/how-to-use-cellular-ram-from-micron.html Eventually found this on the Nexys

How to infer block RAM in Verilog

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 16:33:39
问题 I've got one very specific problem with a project that has been haunting me for days now. I have the following Verilog code for a RAM module: module RAM_param(clk, addr, read_write, clear, data_in, data_out); parameter n = 4; parameter w = 8; input clk, read_write, clear; input [n-1:0] addr; input [w-1:0] data_in; output reg [w-1:0] data_out; reg [w-1:0] reg_array [2**n-1:0]; integer i; initial begin for( i = 0; i < 2**n; i = i + 1 ) begin reg_array[i] <= 0; end end always @(negedge(clk))

Why is RAM in powers of 2?

假如想象 提交于 2019-12-10 14:19:05
问题 Why is the amount of RAM always a power of 2? 512, 1024, etc. Specifically, what is the difference between using 512, 768, and 1024 RAM for an Android emulator? 回答1: Memory is closely tied to the CPU, so making their size a power of two means that multiple modules can be packed requiring a minimum of logic in order to switch between them; only a few bits from the end need to be checked (since the binary representation of the size is 1000...0000 regardless of its size) instead of many more

Get RAM system size

烈酒焚心 提交于 2019-12-10 14:07:56
问题 I would like to know how can I get the size of my RAM through C++ (on Windows 7). 回答1: Use GetPhysicallyInstalledSystemMemory to retrieve the amount of RAM that is physically installed on the computer. (Note that this requires Windows Vista SP1 or later. The function is not available on earlier versions of the Windows operating system.) The remarks on MSDN say: The GetPhysicallyInstalledSystemMemory function retrieves the amount of physically installed RAM from the computer's SMBIOS firmware

Mongodb terminates when it runs out of memory

半腔热情 提交于 2019-12-10 10:02:05
问题 I have the following configuration: a host machine that runs three docker containers: Mongodb Redis A program using the previous two containers to store data Both Redis and Mongodb are used to store huge amounts of data. I know Redis needs to keep all its data in RAM and I am fine with this. Unfortunately, what happens is that Mongo starts taking up a lot of RAM and as soon as the host RAM is full (we're talking about 32GB here), either Mongo or Redis crashes. I have read the following

Ruby/Mechanize “failed to allocate memory”. Erasing instantiation of 'agent.get' method?

走远了吗. 提交于 2019-12-09 20:06:30
问题 I've got a little problem about leaking memory in a Mechanize Ruby script. I "while loop" multiple web pages access forever and memory increase a lot on each loop. That created a "failed to allocate memory" after minutes and made script exit. In fact, it seems that the agent.get method instantiate and hold the result even if I assign the result to the same "local variable" or even a "global variable". So I tried to assign nil to the variable after last used and before reusing the same name