lkml.org 
[lkml]   [2005]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] Cleanup bootmem allocator and fix alloc_bootmem_low
    Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
    >
    > Hi Andrew,
    > The following patch removes alloc_bootmem_*limit apis and fixes
    > alloc_bootmem_low and friends to allocate below the 4G limit.
    >
    > ...
    >
    > +void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, unsigned long goal)
    > +{
    > + pg_data_t *pgdat = pgdat_list;
    > + void *ptr;
    > +
    > + for_each_pgdat(pgdat)
    > + if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
    > + align, goal, 0x100000000)))
    > + return(ptr);
    > +
    > + /*
    > + * Whoops, we cannot satisfy the allocation request.
    > + */
    > + printk(KERN_ALERT "low bootmem alloc of %lu bytes failed!\n", size);
    > + panic("Out of low memory");
    > + return NULL;
    > +}
    > +
    > +void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
    > + unsigned long align, unsigned long goal)
    > +{
    > + return __alloc_bootmem_core(pgdat->bdata, size, align, goal, 0x100000000);
    > +}

    mm/bootmem.c: In function `__alloc_bootmem_low':
    mm/bootmem.c:432: warning: integer constant is too large for "long" type
    mm/bootmem.c:432: warning: large integer implicitly truncated to unsigned type
    mm/bootmem.c: In function `__alloc_bootmem_low_node':
    mm/bootmem.c:446: warning: integer constant is too large for "long" type
    mm/bootmem.c:446: warning: large integer implicitly truncated to unsigned type

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-11-10 12:03    [W:0.023 / U:0.088 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site