memory

More than 640 000 elements in the array - memory problem [Dijkstra]

丶灬走出姿态 提交于 2020-01-02 10:02:41
问题 I have a script which puts 803*803 (644 809) graph with 1 000 000 value inside each. With ~500*500 everything works fine - but now it crashes - it tries to allocate more than 64MB of memory (which I haven't). What's the solution? Somehow "split" it or...? $result=mysql_query("SELECT * FROM some_table", $connection); confirm($result); while($rows = mysql_fetch_array($result)){ $result2=mysql_query("SELECT * FROM some_table", $connection); confirm($result2); while($rows2 = mysql_fetch_array(

Python: computing pariwise distances causes memory error

做~自己de王妃 提交于 2020-01-02 09:36:45
问题 I want to compute the pairwise distances of 57832 vectors. Each vector has 200 dimensions. I am using pdist to compute the distances. from scipy.spatial.distance import pdist pairwise_distances = pdist(X, 'cosine') # pdist is supposed to return a numpy array with shape (57832*57831,). However, this causes a memory error. Traceback (most recent call last): File "/home/munichong/git/DomainClassification/NameSuggestion@Verisign/classification_DMOZ/main.py", line 101, in <module> result

C# Entity Framework high memory usage, memory leak?

倖福魔咒の 提交于 2020-01-02 09:24:23
问题 I've got a small MVC webapplication running using Entity Framework 6. When starting the application by browwsing to the homepage (eg. www.mywebsite.dev) on my dev. machine the applicationpool get's started and the page get loaded as expected. Despithe the fact that the homepage is pretty ligthweight and only get's a few things from the database (2 menu's, 2 paragraphs with text, and a collection with 3-4 objects) the application pool is already > 200 MB (!) after just loading the homepage

Error: Total size of array must not exceed 0x7fffffff bytes

不羁的心 提交于 2020-01-02 09:23:26
问题 I have a small C++ program that requires a large 2d array. int distanceArray[282][9900000]; I am aware that a standard 32 bit console application would be unable to allocate this much memory to my process due to the 2GB cap on 32 bit applications. However, despite the fact that I have configured my compiler to use the native amd64 toolset, I still get the same error when I try to build my application: Error C2148 total size of array must not exceed 0x7fffffff bytes I have 16GB of RAM on my

google common cache - default value of maximumSize (and other “optional” settings) - want a cache that uses all “available” memory

为君一笑 提交于 2020-01-02 08:35:48
问题 I just found Guava by searching for a cache API (it fits perfectly for my needs). But one question arose on reading the wiki and Javadoc - what are the default values of settings the CacheBuilder can take? The Javadoc states "These features are all optional" and "Constructs a new CacheBuilder instance with default settings, including strong keys, strong values, and no automatic eviction of any kind." In my opinion, a good default for maximumSize would be relative to Runtime.getRuntime()

google common cache - default value of maximumSize (and other “optional” settings) - want a cache that uses all “available” memory

╄→гoц情女王★ 提交于 2020-01-02 08:35:38
问题 I just found Guava by searching for a cache API (it fits perfectly for my needs). But one question arose on reading the wiki and Javadoc - what are the default values of settings the CacheBuilder can take? The Javadoc states "These features are all optional" and "Constructs a new CacheBuilder instance with default settings, including strong keys, strong values, and no automatic eviction of any kind." In my opinion, a good default for maximumSize would be relative to Runtime.getRuntime()

Fortran copy of pointer

╄→гoц情女王★ 提交于 2020-01-02 08:34:19
问题 I have a type var that contains a pointer p. I need to copy var on another variable var1 of the same type as var (by doing var1 "=" var, in quotation because I do not know if it is the correct way, see below). In my implementation var and var1 are passed to a subroutine that needs to initialise var1 to var and then modify var1. If I change the values of var1%p, then var%p is modified as well. So, I need to change the values of the memory zone pointed by var1%p, without modifying the memory

Virtual Database in Memory

烈酒焚心 提交于 2020-01-02 07:10:13
问题 Imagine the following: I have a table of 57,000 items that i regularly use in my application to figure out things like targeting groups etc. instead of querying the database 300,000 times a day, for a table that hardly ever changes it's data, is there a way to store its information in my application and poll data in memory directly? Or, do I have to create some sort of custom datatype for each row and iterate through testing each row, to check for the results i want? After some googling, the

Free memory debugger for Windows? [duplicate]

江枫思渺然 提交于 2020-01-02 06:07:26
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Is there a good Valgrind substitute for Windows? I am looking for a free memory debugger for Windows, suited for debugging C++ applications built with VC, with similiar functionality to Insure++ or Purify. Any recomendations? GUI is a plus Integration with VS is a bigger plus 回答1: Ollydbg is also pretty useful. 回答2: valgrind + cygwin ANSIMD (Ansi Memory Debugger) UPS Debugger GoBug Debugger Microsoft Debugging

Can you inject code/an exe into a process with python?

◇◆丶佛笑我妖孽 提交于 2020-01-02 05:57:30
问题 I've seen a few sites talking about injecting DLL's (such as http://www.codeproject.com/KB/DLL/DLL_Injection_tutorial.aspx), but I'm struggling with how to get an EXE to work. any help/tips would be appreciated. The best way I know how to explain it is "RunPE" where you execute an exe in the memory. Does that help at all? 回答1: If you're asking how to inject code into a running Python process, what you want is https://fedorahosted.org/pyrasite/ . 回答2: You can use the Reflective DLL Injector as