Global memory variables

Hi Navision allows us to create global variables of type record. Is the memory occupied by this variables is fixed size ? For example one global variable of record customer which have 200000 records. another global variable of record city which contain 2000 records. Are both this variables taking the same quantity of memory? Is it taking any memory in case I am not using this variables in my program. ? Regards

Interesting questions.

quote:


Is the memory occupied by this variables is fixed size ?


Yes, the size of a Record Variable is exactly the size needed to hold one record.

quote:


one global variable of record customer which have 200000 records. another global variable of record city which contain 2000 records. Are both this variables taking the same quantity of memory?


Another issue is the cash which tries to take as many records to the memory as possible in order to speed up execution time. But that’s another issue.

quote:


Is it taking any memory in case I am not using this variables in my program. ?


Yes, no matter whether the record variable is filled with zeros (uninitialized) or contains useful data, the size is always the same. — Another interesting issue in this context is passing records to a Procedure: If a 1024 Byte record is passed as VAR, only a pointer to the start memory address of the record is being passed (32 Bytes). If it’s not a VAR, the whole 1024 bytes are being passed to the Procedure. ------- With best regards from Switzerland Marcus Fabian

Hi thank for your help

quote:


Yes, the size of a Record Variable is exactly the size needed to hold one record


Is it means the size of the memory variable dynamically changing depending on the no. records ? Regards. Joseph Mathew

quote:


Yes, the size of a Record Variable is exactly the size needed to hold one record


quote:


Is it means the size of the memory variable dynamically changing depending on the no. records ?


Nope, that means that if you got a table where each record’s size it’s 2000 bytes, a record variable from that table will take 2000 bytes of memory (no matter how many records it has on it). – Alfonso Pertierra apertierra@teleline.es Spain