heap memory

yoge05

yoge05

@yoge05-16YB0U Oct 22, 2024
hi,
In C whenever memory is allocated dynamically (eg:malloc), the memory allocated is heap memory , but is this a virtual memory or secondary memory? plz reply

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • sushant005

    sushant005

    @sushant005-tyt4WK Sep 29, 2010

    first heap memory is a part of main memory and is logical concept is not pre allocated and as you said dynamically (malloc) so it is a dynamic allocation of meory in RAM is called as heap memory.But i think it not exactly taking all the part of memory it also takes some of the part of virtual memory.

    do me correct if i m wrong.
  • Reya

    Reya

    @reya-SMihdC Sep 29, 2010

    Heap is a region of contiguous virtual memory takes up a whole page or a fraction of page for storage.