[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

What's the limit of variables size in pyhton?

??????

12/31/2007 5:41:00 PM

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
6 Answers

Gabriel Genellina

12/31/2007 6:38:00 PM

0

En Mon, 31 Dec 2007 15:40:31 -0200, Ù?Ù?داÙ?Ù? <3D.v.World@gmail.com> escribi�:

> 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.

--
Gabriel Genellina

??????

12/31/2007 10:06:00 PM

0

On Dec 31, 11:26 am, "James Matthews" <nytrok...@gmail.com> wrote:
> However some Debuggers will not show you variable's that are too big!
>
> On Dec 31, 2007 7:38 PM, Gabriel Genellina <gagsl-...@yahoo.com.ar> wrote:
>
> > En Mon, 31 Dec 2007 15:40:31 -0200, ?????? <3D.v.Wo...@gmail.com>
> > escribi?:
>
> > > 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.

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

Mensanator

12/31/2007 10:25:00 PM

0

On Dec 31, 4:05 pm, "??????" <3D.v.Wo...@gmail.com> wrote:
> On Dec 31, 11:26 am, "James Matthews" <nytrok...@gmail.com> wrote:
>
> > However some Debuggers will not show you variable's that are too big!
>
> > On Dec 31, 2007 7:38 PM, Gabriel Genellina <gagsl-...@yahoo.com.ar> wrote:
>
> > > En Mon, 31 Dec 2007 15:40:31 -0200, ?????? <3D.v.Wo...@gmail.com>
> > > escribi?:
>
> > > > 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.
>
> 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.

Gabriel Genellina

12/31/2007 10:53:00 PM

0

En Mon, 31 Dec 2007 20:05:41 -0200, Ù?Ù?داÙ?Ù? <3D.v.World@gmail.com> escribi�:
> On Dec 31, 11:26 am, "James Matthews" <nytrok...@gmail.com> wrote:
>> However some Debuggers will not show you variable's that are too big!
>>
>> On Dec 31, 2007 7:38 PM, Gabriel Genellina <gagsl-...@yahoo.com.ar>
>> wrote:
>>
>> > En Mon, 31 Dec 2007 15:40:31 -0200, Ù?Ù?داÙ?Ù? <3D.v.Wo...@gmail.com>
>> > escribi�:
>>
>> > > 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.
>
> 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?

--
Gabriel Genellina

Dennis Lee Bieber

12/31/2007 11:18:00 PM

0

On Mon, 31 Dec 2007 14:05:41 -0800 (PST), "åäÏÇæì"
<3D.v.World@gmail.com> declaimed the following in comp.lang.python:

> 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
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/

Artur M. Piwko

1/4/2008 3:52:00 PM

0

In the darkest hour on Mon, 31 Dec 2007 20:53:28 -0200,
Gabriel Genellina <gagsl-py2@yahoo.com.ar> screamed:
>> 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).

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

--
[ Artur M. Piwko : Pipen : AMP29-RIPE : RLU:100918 : From == Trap! : SIG:240B ]
[ 16:51:04 user up 11576 days, 4:46, 1 user, load average: 0.97, 0.71, 0.01 ]

No wonder people are so horrible when they start life as children. -- K. Amis