9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] kernel bug
@ 2014-06-03  1:14 Yoann Padioleau
  2014-06-03  5:49 ` cinap_lenrek
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Yoann Padioleau @ 2014-06-03  1:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

in the newseg() function there is:

    mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB;
    if(mapsize > nelem(s->ssegmap)){
        mapsize *= 2;
        if(mapsize > (SEGMAPSIZE*PTEPERTAB))
            mapsize = (SEGMAPSIZE*PTEPERTAB);
        s->map = smalloc(mapsize*sizeof(Pte*));
        s->mapsize = mapsize;
    }
    else{
        s->map = s->ssegmap;
        s->mapsize = nelem(s->ssegmap);
    }

I think it should be
if(mapsize > (SEGMAPSIZE))
            mapsize = SEGMAPSIZE;

Also why in the kernel they use 'struct Pte' instead of the better name Pagetable.
In many places this is very confusing because when I see Pte I think of a Pagetable Entry
where really they are speaking about a Pagetable.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-06-04 19:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03  1:14 [9fans] kernel bug Yoann Padioleau
2014-06-03  5:49 ` cinap_lenrek
2014-06-03  6:00 ` Anthony Martin
2014-06-03 15:47 ` erik quanstrom
2014-06-03 15:56   ` andrey mirtchovski
2014-06-03 16:04     ` erik quanstrom
2014-06-04 19:12   ` Anthony Martin
2014-06-03 16:08 ` Charles Forsyth
2014-06-03 17:08   ` erik quanstrom
2014-06-03 18:04     ` Charles Forsyth
2014-06-03 18:09       ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).