How do I set memory limits?

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: How do I set memory limits?

Re: How do I set memory limits?

Post by guest3456 » 01 Mar 2018, 12:02

i think HotKeyIt is saying to use x64 version of AHK-H

Re: How do I set memory limits?

Post by arcticir » 01 Mar 2018, 05:09

So, when I use 64-bit system, there is enough memory, it is still wrong, because of what?

Re: How do I set memory limits?

Post by Helgef » 01 Mar 2018, 02:41

Wow, that makes a big difference, I didn't know. Thanks for pointing that out HotKeyIt :wave:

Cheers.

Re: How do I set memory limits?

Post by HotKeyIt » 28 Feb 2018, 17:53

Simply use 64-bit version and you can use all your memory :)

Re: How do I set memory limits?

Post by Helgef » 28 Feb 2018, 04:23

I cannot answer that. There could be system factors on memory handling, I have no idea. I get out of memory on loop 33, I have only 8 gb ram, but loop 33 implies some 12 gb allocation, apparently my system is ok with that.

Re: How do I set memory limits?

Post by arcticir » 28 Feb 2018, 04:13

I can't agree with you.
My memory usage is 2/16G, how much memory do I need to add to not make mistakes?

Re: How do I set memory limits?

Post by Helgef » 28 Feb 2018, 03:39

How do I adjust the inner limit to 2G?

It is not the inner limit which you are exceeding (there is none), it is your system's / PC's limit. There is no limit for object's fields in v1 either, but there we have #MaxMem for variables. So to answer the thread title, buy more memory for your PC ;). You could also free up more memory by closing memory heavy application, if any such are running.

Cheers.

Re: How do I set memory limits?

Post by arcticir » 28 Feb 2018, 01:26

So this is normal? Or a bug?

Re: How do I set memory limits?

Post by HotKeyIt » 26 Feb 2018, 17:52

You simply hit the memory limit, same happens in AHK_L:

Code: [Select all]GeSHi © Codebox Plus

f:=[]
Loop 5
MsgBox f.SetCapacity("cache" A_Index,388*1024*1024)

Re: How do I set memory limits?

Post by arcticir » 25 Feb 2018, 23:44

Try It

Code: [Select all]GeSHi © Codebox Plus

a:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")
b:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")
MsgBox a:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")
MsgBox a:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")

f:=[]
MsgBox f.SetCapacity("cache",388*1024*1024)

Re: How do I set memory limits?

Post by HotKeyIt » 25 Feb 2018, 19:49

Works fine for me:

Code: [Select all]GeSHi © Codebox Plus

a:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")
b:=ahkThread("f:=[]`nMsgBox f.SetCapacity('cache',388*1024*1024)")
f:=[]
MsgBox f.SetCapacity("cache",388*1024*1024)

How do I set memory limits?

Post by arcticir » 25 Feb 2018, 15:19

The following code, if there is only one thread (DLL), is normal to load.
However, if you use two threads , it will complain.

Error: Out of memory.

Code: [Select all]GeSHi © Codebox Plus

f:=[]
MsgBox f.SetCapacity("cache",388*1024*1024)


How do I adjust the inner limit to 2G?

Top