1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to implement poisoning concept in memory allocation

Discussion in 'C' started by jeya, Jul 14, 2008.

  1. jeya

    jeya New Member

    Joined:
    Jul 3, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    hi all,


    In my program,a user defined function is created which internally uses malloc() and free().

    But I dont know how to create header and footer for the allocated memory.

    And poisoning concept should be implemented checking the header and footer areas to know whether user has exceeded memory space or not.If so,allocated memory will be deallocated.

    pls tell me how to implement the poisoning concept
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    It's not clear (to me anyway) what you mean. What is poisoning, and what does that have to do with user quotas? What is the purpose of the header and footer, and what do they contain? Where will the header and footer be used, and to what end?
    If a memory request means the user will exceed their quota then perhaps it would be better not to allocate the memory in the first place.
     

Share This Page