#pragma dynamic
#1

Hi,

I have big script and i need use this #pragma dynamic,because i get warnings for big memory use.

Now i use

Код:
#pragma dynamic 2000000
But i want to ask. What is limit of dynamic? what max number?
Reply
#2

I believe it is 2147483647.
Reply
#3

You should ask yourself: why do I need to increase the memory limit in the first place? It is usually a sign of bad coding practices.

The documentation does not state a maximum limit so I suppose it would be the same as the amount of available RAM.

Quote:
Originally Posted by theYiin
Посмотреть сообщение
I believe it is 2147483647.
That may actually be true since it translates to some 8.5 gigabytes.

Edit calculated that wrong. A cell is 32 bits, not bytes. Corrected now. :$
Reply
#4

Then 2000000 how much takes rams?
Reply
#5

Try optimizing your code first.
Reply
#6

Approximately 8 megabytes. The value is counted in cells. One cell is 32 bits. Times 2 million is 64 million bits.
Reply
#7

The byte limit remains at cellmax, so the highest possible number who #param dynamic accepts is 536870911 (cellmax / 4) otherwise it goes negative (that would be rounded off 512 MB)

But you should ask yourself that again
Quote:
Originally Posted by Vince
Посмотреть сообщение
You should ask yourself: why do I need to increase the memory limit in the first place? It is usually a sign of bad coding practices.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)