Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:47:57+00:00 2026-06-01T18:47:57+00:00

We have a class to represent a list in a very large application: CSMLNode

  • 0

We have a class to represent a list in a very large application:

CSMLNode
{
   CSMLNode *pChild;
   CSMLNode *pSibling;  

   CSMLNode()
   {
     pChild = NULL;
     pSibling = NULL;
   }         
}

For optimization, the node objects created are kept in a pool and reused over the lifetime of the application. The node objects are released only when the number of node objects exceeds a particular count. When the node objects are released to the pool or taken from the pool, the value of pChild and pSibling are not set to NULL. We susepect that this is creating crashes in the application.

I am planning to set the value of pChild and pSibling to 0xDDDDDDDD, if its values are not NULL when taken a node object from the pool. My intensrion is to forcefully crash the application, when pChild or pSibling pointers are accessed without setting proper object pointers to pChild and pSibling after taking node object from from the pool.

Will this work as I am expecting? If it doesn’t, what pointer value should I give for forceful access violation.

I have enabled full page heap to get the access violation as early as possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:47:57+00:00Added an answer on June 1, 2026 at 6:47 pm

    The Visual Studio debug CRT already does this. Memory you allocate from the heap is initialized to 0xcdcdcdcd. Since your struct contains pointers, dereferencing an uninitialized pointer will automatically generate an AV. The debug heap initialization values are documented here.

    You don’t have to help. Avoid keeping your own pool, the CRT already does a fine job with ample help from the Windows low-fragmentation heap. If you want to keep it then I’d suggest you use the same approach as the debug CRT. Don’t skip on everything else it does, the no-man’s land areas are an excellent way to detect memory corruption early.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple list of objects that represt people. Each object has
how to represent a graph with list data structure i have three class (Graph,
In my Android application I have created an SVG image converter class. It parses
I have a few objects that represent a web application. Currently I have a
I have some objects that are created/destroyed very often and that can exist in
I have got a designing dilema. I have a class named UserAccount that represent
I have a sorted mutable array of a class called Topic. The topics represent
i have a list of simples pojos (a User class) with about 15 simple
I have a method that searches a list of objects based on some of
i have very simple problem. I need to create model, that represent element of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.