[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] _itoa



On Tue, 15 Jun 1999, Morten Olsen wrote:

> Jeg ved ikke hvor smart realloc er implementeret. Man kunne forestille
> sig at den burde være lavet således at den blot lavede nogle trick med
> MMU'en således at den ikke behøvede at kopiere elementerne over til et
> nyt sted i hukommelsen. 

Naar man allokerer fx en 4k (afhaengigt af nogle parametre man vist selv
kan saette, men den skal jo vaere paa mindst een side) blok hukommelse,
saa laver glibc en mmap() af anonymous hukommelse.. Saadan noget
hukommelse kan man remappe med mremap() -- jeg mener at det har vaeret
diskuteret om glibc brugte det eller skulle bruge det.

Men med mremap bliver slet ikke noget kopieret: Den virtuelle adresse der
foelger den foerste virtuelle adresse bliver bare mappet til en rigtig
fysisk side.

Jeg har desvaerre ikke glibc sovsen ved haanden, men det giver en rimelig
hurtig realloc :)

> Som en rigtig god forelæser på DTU, der nu desværre er blevet scoret af
> den forp*lede IT højskole, sagde: "Linked lists are cute, but Real Men
> use arrays"

Nu er jeg "bare" datamatiker, men selvom jeg har for laenge siden laest om
traeer er den ene og den anden slags (roed/sort, balanceret, b-trees), saa
er der bare 3 datastrukturer jeg synes har brugt: arrays, linked lists og
hash tabeller :)


-- 
==============================================================================
Erwin Andreasen   Herlev, Denmark <sslug@sslug>          UNIX System Programmer
<URL:http://www.andreasen.org>              <*>         (not speaking for) DDE
==============================================================================



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *