What's the limit of variables size in pyhton?

Å

åäÏÇæì

Python allow you to only take care about variable name and ignore it's
size because pyhton dynamicly allocate it
so what's the limit in the allocated size in the memory
 
G

Gabriel Genellina

Python allow you to only take care about variable name and ignore it's
size because pyhton dynamicly allocate it
so what's the limit in the allocated size in the memory

As big as would fit on available memory.
 
Å

åäÏÇæì

However some Debuggers will not show you variable's that are too big!

Is that mean that i can deal with files with size more than 2GB only
if the available memory allow
 
M

mensanator

Is that mean that i can deal with files with size more than 2GB only
if the available memory allow

No, files can be often be dealt with in manageable
chunks. Instead of reading the entire file into
memory, often it suffices to read in a line at a
time.
 
G

Gabriel Genellina

Is that mean that i can deal with files with size more than 2GB only
if the available memory allow

To be more precise, that depends on the OS. On Windows there is a limit of
2GB adressable memory per process (this is unrelated to the amount of
physical memory). You may increase that limit to 3GB. I think Python can
handle all the memory the OS is able to provide.
But do you actually have to keep the whole file in memory?
 
D

Dennis Lee Bieber

Is that mean that i can deal with files with size more than 2GB only
if the available memory allow

Why are you even trying to load the entire file at one time? If it's
a text file, or even a fixed length record binary file, process it a
record at a time (or in a cluster of records). If it's some sort of raw
binary with no fixed records, you can probably still stream it in
chunks.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
A

Artur M. Piwko

In the darkest hour on Mon, 31 Dec 2007 20:53:28 -0200,
Gabriel Genellina said:
To be more precise, that depends on the OS. On Windows there is a limit of
2GB adressable memory per process (this is unrelated to the amount of
physical memory).

That's the 32bit Windows limit only (afaik).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top