Results 1 to 4 of 4

Thread: Memory allocation optimized bitwise

  1. #1
    Join Date
    Jan 2009
    Posts
    638

    Memory allocation optimized bitwise

    Does any one know if there is an allocation that can be optimized in terms of bits?

    Usually, when I declare int i = 5, for example, I use only 3 bits of the 32 (or 64). Is there any allocation function that can be used to retrieve the remaining 29 bits for other benefits? Having already tried without much success I plan to write this feature myself, but that seems rather complicated, because I would use masks to retrieve the values stored in a memory word. What do you think?

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Memory allocation optimized bitwise

    If you want to lose your time, you can use a char a minimum size of 8 bits (not 32). Also if you want to lose your time, you can have fun by using bit masks and shifts. In any case, I doubt very much that you can have rough int aligned.

  3. #3
    Join Date
    Jan 2009
    Posts
    638

    Re: Memory allocation optimized bitwise

    For a simulator of distributed neural network. The goal is to run a maximum of neurons on each machine.

    So do you think it's something difficult and unnecessary? Is there anyone who think that it is feasible? The solution that I would store a number mask (from 1 to 36 for one byte, for example) to use for each benefit, but it seems a little heavy. Do you have ideas to propose to me?

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: Memory allocation optimized bitwise

    I think that in the first place, a memory that would be more profitable. If there has ever been and that the code is consistent, then that is definitely memory leaks, or releases ever made, or unnecessarily greedy algorithms. Correct can improve things at lower costs (in addition to stabilize the product).

    Then, if you are already distributed and you have already pulled the string, then it is only cutting into smaller tasks for lots more severe. Along with a good task scheduler is a more pay in any case it was with us.

Similar Threads

  1. Replies: 8
    Last Post: 21-09-2011, 10:41 PM
  2. Memory allocation of new object
    By Miles Runner in forum Software Development
    Replies: 5
    Last Post: 09-03-2010, 10:18 AM
  3. Memory allocation in C++
    By Prashobh Mallu in forum Software Development
    Replies: 5
    Last Post: 08-02-2010, 09:56 AM
  4. Memory allocation and management
    By AdityaR in forum Software Development
    Replies: 4
    Last Post: 22-01-2010, 08:42 PM
  5. SBSMonitoring/SQL Memory allocation error (run away Memory usage)
    By Dilbert in forum Small Business Server
    Replies: 1
    Last Post: 21-09-2005, 11:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,489,985.54006 seconds with 17 queries