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 8819647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:24:49+00:00 2026-06-14T05:24:49+00:00

Do you have some solution, how to make object pool ( memory pool )

  • 0

Do you have some solution, how to make object pool (memory pool) with objects than can contain different data with different size ? So if I request for object in memory pool with some size, it returns to me some allocated memory chunk with the closest size to my request. It should be written in C#. Thank you, because I really dont exactly know, what is the best collection for this and best algorithm. In C++ there are some solutions but there is no memory pool for C#.

  • 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-14T05:24:51+00:00Added an answer on June 14, 2026 at 5:24 am

    .Net Framework already has such an implementation (used by Windows Communication Foundation). See BufferManager

    var buffMgr = BufferManager.CreateBufferManager(
                     104857600, // use no more than 100 MB in total
                     10485760);  // allocate 10 MB max to each buffer
    var buff = buffMgr.TakeBuffer(65535); // allocate a buffer enough to fit a 65 KB object
                               // note: this could return a buffer bigger than 65 KB 
    
    //when done with the buffer:
    buffMgr.ReturnBuffer(buff);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found some similar Que's on SO but had not find the solution.
i have installed openipmp server on my windows. They had given some client solution
I have gone through some other answers, but cannot get the solution to my
I have a .NET solution that works together with some classic ASP pages, as
Let's say I have a solution involving an iPhone app that generates some information
For strongly-typed & type-safe solution, I have to do the following step. Create some
I have some trouble finding the right design solution for a problem of sharing
I have a process that is doing some heavy maths with gl rather than
I have some code that sorts table columns by object properties. It occurred to
I'm trying to create specific object pool in c# . I have two basic

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.