B
B
beduin012017-05-07 17:43:15
Programming
beduin01, 2017-05-07 17:43:15

How is memory allocated in dynamically typed languages?

Suppose I want to load data from the database into memory in order to process it later. In a statically typed language, I can create a structure in which to describe the dimension of the data:

int id
int age
char [50] name

And as a result, I will have allocated and reserved memory for the size of the data itself. And in dynamically typed as? For the same int, every time it passes some built-in limit, will a new memory allocation occur?
By the way, with the string data type, how everything happens. Will the allocations also be permanent?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Kolesnichenko, 2017-05-07
@KolesnichenkoDS

It is not clear what "permanent" allocations with numbers and strings can be if they are immutable in Python (and judging by the tags, this is still about Python).

K
Konstantin Tsvetkov, 2017-05-07
@tsklab

Suppose I want to load data from a database into memory
The server usually has more RAM than the client computer. So the chance that your data will be in memory while being processed is greater on the server. On the client computer, there is a chance that your data will be paged to disk.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question