[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I think this qualifies as a newbie question
Oleg Goldshmidt wrote:
> "Peter L. Peres" <plp@actcom.co.il> writes:
>
> > At the hw level: The addressable memory on an Intel proecssor is divided
> > into pages (currently 4k each ?). This is the minimum size of any
> > allocated memory, file, program etc.
>
> Are you saying that "malloc(sizeof(int))" allocates 4k on an Intel
> machine?
ANy answer to this question will be false. You cannot know how much
memory will be allocated since the Algorithm ued by malloc is an
on-line addaptive one. The answer is that it can be between 0 bytes and
100M or so. And it can be non-dependant on the size you asked.
>
>
> --
> Oleg Goldshmidt goldshmt@netvision.net.il
> BLOOMBERG L.P. (BFM) oleg@bfr.co.il