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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:43:01+00:00 2026-06-06T16:43:01+00:00

I am aware about the concepts of data type or structure alignment, packing, padding

  • 0

I am aware about the concepts of data type or structure alignment, packing, padding issues etc. I have implemented a single linked list where each node occupies approximately 250 bytes i.e. around 4 times the size of cache line of 64 bytes. My machine is a Intel 64 bit architecture.

Now a single linked list is essentially a pointer chasing data structure and thus suffers from high number of cache misses. In order to reduce the cache misses, I aligned each data structure node using *posix_memalign* function to cache lined boundary of 64 bytes. Now all linked list nodes are cache aligned.

After doing this, I find that memory consumption of linked list has increased considerably and also the performance has actually deteriorated. Can anyone explain what could be possibly going wrong ?

  • 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-06T16:43:02+00:00Added an answer on June 6, 2026 at 4:43 pm

    I don’t know what malloc you use but this is from tcmalloc

    // For use by exported routines below that want specific alignments
    //
    // Note: this code can be slow for alignments > 16, and can
    // significantly fragment memory.  The expectation is that
    // memalign/posix_memalign/valloc/pvalloc will not be invoked very
    // often.  This requirement simplifies our implementation and allows
    // us to tune for expected allocation patterns.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Data-aware controls can be linked to datasets to display data contained in fields in
I'm aware about the requirement of sanitizing entered or form-submitted data on public websites.
Preface: This is not much about how to structure code within files. I have
I'm new to iPhone and i know about the primitive data structure in C
I'am aware there has been a generic question about a best IDE in C++
Note: I'm aware about the disadvantages of using BinaryFormatter in large files. But this
I am well aware about error_reporting(0); & ini_set('display_errors', Off); to make error messages go
I am new to Objective-C and want to know about inheritance. I am aware
I am aware that System.Threading.Timer exists, but I already have a Thread. This thread
Im all aware about services like github and such which provide a really nice

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.