lkml.org 
[lkml]   [2000]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    Subjectfreeing memory
    hi,

    i am allocating some 1000 bytes of memory as folows

    f_malloc()
    {
    .....
    for (i=1 to 10)
    {
    size = 1000;
    pAddr[i] = (unsigned long) kmalloc(size, GFP_DMA | GFP_BUFFER);
    }
    ...
    }

    and freeing the allocated memory as follows

    f_free()
    {
    .....
    for (i=1 to 10)
    {
    kfree(pAddr[i]);
    }
    }

    pAddr is defined as 'unsigned long pAddr[10]'

    But when f_free executes i ran into problems and computer hangs.
    What can be the problem?????

    regards,
    daljeet.


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

    \
     
     \ /
      Last update: 2005-03-22 12:41    [W:0.020 / U:31.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site