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

  • Home
  • SEARCH
  • 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 957561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:43:24+00:00 2026-05-16T00:43:24+00:00

Plan to have a data structure to store temporary binary data in the memory

  • 0

Plan to have a data structure to store temporary binary data in the memory for analysis.

The max size of the data will be about 10MB.

data will be added at the end 408 bytes at a time.

no search, retrieve operations on those temporary binary data.

data will be wipe out and the storage will be reused for next analysis.

questions:

  1. which structure is good for this purpose? byte[10MB], List<bytes>(10MB), List<MyStruct>(24000), or ...?
  2. how to quickly wipe out the data (not List.Clear(), just set the value to 0) for List or array?
  3. If I say List.Clear(), the memory for this List will shrink or the capacity (memory) of the List is still there and no memory allocation when I call List.AddRange() after the Clear()?
  4. List.Insert() will make the List larger or it just replace the existing item?
  • 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-05-16T00:43:24+00:00Added an answer on May 16, 2026 at 12:43 am

    If your data is usually the same size, and always under a certain size, use a byte array.

    Create a byte[], and a int that lets you know where the end of the “full” part of that buffer stops and the “free” part starts. You never need to clear it; just overwrite what was there. The only problem with this is if your data is sometimes 100 kb, sometimes 10 MB, and sometimes a bit larger than you originally planned for.

    List will be slower to use and larger in memory, although they handle various sizes of data out of the box.

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

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How about simply resetting the VSS admin password? http://not42.com/2005/06/16/visual-source-safe-admin-password-reset/ http://thetrainerph.spaces.live.com/blog/cns!9F717AF2A2401F0F!2809.entry… May 16, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer XAMPP is a standalone AMP solution, so you don't need… May 16, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer Found out there was a problem with the server i… May 16, 2026 at 4:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a maintenance plan that looks like this... Client 1 Import Data (Success)
I have written an Excel VBA macro which imports data from a HTML file
I will start by saying this is the first time I have done anything
I have been developing a project and in this project i have designed my
I am currently in the process of rewriting an application whereby teachers can plan
I am new to designing my own database. My project is orders/products/inventory type data,
I will make an application with a lot of similar items (millions), and I
Does Oracle have a column metadata for storing its printable friendly label? Say I
I have a Java web application that has a 'disconnected' Java Swing desktop app.
I am getting a set of data from the database where the query produces

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.