User Profile

Collapse

Profile Sidebar

Collapse
ayatsynych
ayatsynych
Last Activity: Apr 4 '11, 01:13 PM
Joined: Mar 8 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ayatsynych
    replied to Is memory allocated on stack or on heap?
    in C
    Banfa, thank you very much!
    Great answer!
    See more | Go to post

    Leave a comment:


  • ayatsynych
    replied to Is memory allocated on stack or on heap?
    in C
    Yep, it it has functionality to attach existing data store, it mean that memory was already allocated before, and you don't know if you can do realloc on this memory, or not
    See more | Go to post

    Leave a comment:


  • ayatsynych
    replied to Is memory allocated on stack or on heap?
    in C
    Thanks Banfa,
    Sure, it's not something that should be used in the system design, I was just curious, because recently saw C++ implementation of DataBuffer (something like this one: DataBuffer), and creators were trying to detect if attached block of memory is on heap or on stack, so they would know how to handle this memory further.
    Anyhow, thank you very much for answering my question!
    See more | Go to post

    Leave a comment:


  • ayatsynych
    started a topic Is memory allocated on stack or on heap?
    in C

    Is memory allocated on stack or on heap?

    Hi,
    Is there any way to determine at run-time if block of memory allocated on stack or on heap? For example:

    Code:
    BYTE* pData = new BYTE[100];
    BYTE data[100];
    BYTE* pData1 = &data[0];
    
    //Hot to determine that pData is on heap, and pData1 is 
    //on stack?
    UPDATE: As I understand there is no generic solution for this one, so I need solution for Windows platform. I know that there...
    See more | Go to post
No activity results to display
Show More
Working...