Memory management is the act of managing computer memory by allocating portions of memory to programs as well as freeing memory so that it can be re-used.
-1
votes
0answers
10 views
Serial communuication application of 24*7 having memory issue
I am having a serial port communication application using 3 serial ports DMX (m_port,m_port1,m_port2) which will run 24 *7 , so i just need to ensure memory usage doesn't go above limit with using(), ...
-1
votes
0answers
17 views
Serial port communication using serial multiple ports having issue of memory management [on hold]
I am having a serial port communication application using 3 serial ports DMX (m_port,m_port1,m_port2) which will run 24 *7 , so i just need to ensure memory usage doesn't go above limit with using(), ...
-3
votes
0answers
14 views
ASP.Net architecture problem or memory leak? [closed]
Please review the following question and find flaws if there are any in the architecture (C# code).
http://stackoverflow.com/questions/36311852/asp-net-applications-memory-leak-and-architecture-...
8
votes
5answers
264 views
Custom list to avoid out of memory exceptions
The following class is a helper to avoid OutOfMemoryException exceptions being thrown when the list is to large so that it is added onto the large objects heap. To ...
7
votes
0answers
98 views
Aligning your heterogenous uninitialized memory to make the processor happy
After learning more about memory alignment and how it can impact processor data access, I tried to find something in the standard that offers proper memory alignment inside blocks of raw memory that ...
0
votes
1answer
42 views
Basic C++ lin-alg class - conditional jump depends on uninitialized values [closed]
I am currently working on a small project in C++ to help me learn the language, but I am running into a bit of trouble unfortunately.
I have written code for basic vector operations, and I want to ...
2
votes
0answers
51 views
Low performance of HTTP request using Haskell wreq
The program makes HTTP requests (checks video stream status) and calls an external program.
...
4
votes
2answers
97 views
C++ object pool
I am a beginner and would like to build a pool. I made some research and found out that if my software has heavy object create and delete part, I should use a pool because of performance. I made some ...
2
votes
1answer
84 views
Pointer lists for a C++ garbage collector
The problem
My intention is to have a class A and class B. class B has a ...
9
votes
1answer
63 views
Longest lines using priority queue
Inspired by a comment on this question, I thought I'd exercise my C skills by implementing something like it using a priority queue.
The idea is to be able to invoke the program like this:
./...
4
votes
1answer
58 views
Allocating a contiguous block of memory for an array
I try to work with a contiguous block of memory, to create an array (2D) whose SIZE is not known at compile time (before c99) so no variable-length arrays are involved here.
I came up with the ...
3
votes
1answer
53 views
Testing different implementations of malloc()
Can you help me verify my test result? I'm testing different malloc() implementations with a small program that allocates gigabytes many times:
...
3
votes
2answers
81 views
calloc, malloc, free and realloc wrappers to store the size being allocated
I'm currently building a node.js addon for libcurl. Right now I'm trying to correctly use v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory to ...
0
votes
0answers
37 views
Fast ReadProcessMemory, save guest names that is in memory in hum text file
My code is very slow. How do I get it fast? I would also like to put a scanner on if you have a name in memory to save it in a text file.
...
-4
votes
2answers
160 views
RAM overhead on a compression program [closed]
In a program, the one below is attempting to codify into a translation of another file. The output is severely condensed. It works, and once I get it to decompress, then it will win award after award. ...
4
votes
3answers
187 views
Simple Pool Allocator
This is a simple pool allocator, based (to at least some degree) on a previous answer. The basic idea is pretty simple: allow a user to allocate objects of some type quickly (in relatively large ...
5
votes
1answer
53 views
Lazy String splitter in C++
I created a string splitter in C++. It splits a string in a lazy fashion and makes use of forward iterators to sequentially supply the next token from the string until it runs out of tokens.
...
6
votes
2answers
68 views
Comparing vehicle crash data the previous year
I have created an automated macro which takes vehicle crash data from a .csv file and automatically creates a pivot table and charts and compares it to the previous year. The code is approximately ...
9
votes
1answer
62 views
Block Allocator
I wrote below block allocator for exercise and would love to get your suggestions.
Main features I wanted to have :
Detecting buffer overflows with canary terminator.
Being able to allocate ...
2
votes
0answers
27 views
Fetching a weather report on an Arduino from a web service
I'm writing some code which is basically supposed to http get some information from my own website and parse it, which (finally) works. However, when I compile the code, it shows this:
Sketch uses ...
6
votes
3answers
120 views
View programming pattern in C++ without raw pointers
I'm trying to achieve, for lack of a better term, a "view" pattern in C++. It's probably most comparable to "views" in the Database world, where one can make a query, and then perhaps aggregate the ...
3
votes
0answers
17 views
Using STORAGE macro using QSAM for input/output
I was wondering if you can help me out. I wanted to know if there is an easier way to do the following. My code works but I feel like there is a lot things going out with multiple loops and wanted to ...
1
vote
0answers
34 views
Producer/Consumer write to file
I'm concerned with the memory usage of this application. When I start it and look at it's memory usage while it's waiting for input, it's memory usage is around 13,212 K.
When the application runs ...
4
votes
2answers
165 views
Memory Management Code
For a project I had to do a memory management problem without creating any custom classes or templates using the provided pool array and ...
1
vote
2answers
86 views
Delphi 2009 interface
I have this code and at the end of it, FastMM shows that there were memory leaks with all the objects of TSinc:
...
4
votes
2answers
794 views
Binary file validity in C++/C++11: checking a binary header
I have some code for checking a binary header to see if a binary file is meant to be read by a certain program, and I could use some extra eyes to review it.
Assume the following ...
8
votes
1answer
84 views
3
votes
2answers
105 views
Hello World using Python embedded in C++, with RAII library initialization
I have written a small Hello World application that uses Python's C-API. The C library requires some functions to be called for global library (de-)initialization and the objects created by the ...
7
votes
3answers
3k views
Replace space with %20
This is not very memory-efficient. Can you please suggest a better way or improvement?
...
3
votes
1answer
61 views
Reducing memory footprint when manipulating big csv file
I have CSV file which has structure like this (separated by tabulators):
...
3
votes
1answer
43 views
Computing the double Integral using MonteCarlo techniques using Julia
I decided to try and learn Julia for doing scientific computing, and I decided to tackle the problem of finding
$$ \int_{D_{\frac{1}{4}}} x^4 + y^2 dA $$
where \$ D_{\frac{1}{4}} \$ is the part of ...
3
votes
2answers
67 views
BMP file writer
In my current project I'm writing a C function to write a BMP-File. Internally, the function is split up into three parts: write header, write info header, write data.
In some of these functions I do ...
4
votes
1answer
37 views
YAGOP - Yet Another Generic Object Pool
While thinking about this question it struck me that one problem of linked data structures always seems to be loss of memory locality and performance could possibly be improved if all allocated nodes ...
1
vote
0answers
35 views
Purging elements from the map if it reaches a memory size limit
I have implemented a LRU cache using ConcurrentLinkedHashMap. In the same map, I am purging events if my map reaches a particular limit as shown below.
I have a ...
1
vote
0answers
65 views
C++ base class for heap awareness
I have a few classes that form a class hierarchy where some objects point to others. In the usual case, I create these object on the stack. In other cases, I need to clone these object to do some ...
3
votes
1answer
46 views
Singly linked list in pure C - follow-up
This is an update for this post.
I fixed all style-issues from the comments, but still have a few questions left:
Someone commented that my last post contained too many functions, which could be ...
2
votes
3answers
72 views
Singly Linked List in pure C
I recently learned about linked lists and here is my first try to write one in C. I know it's a lot of code, but I hope someone takes a look. Any tips memory allocation and improvements are welcome.
...
8
votes
3answers
443 views
Implementing IDisposable
I am developing a class (in a C# MVC 5 project) that originally had a using block within a single method, and it got to be very huge after placing formatting ...
3
votes
2answers
129 views
Memory leak in Java's stack implementation
Recently I was asked to implement a stack specifically for storing 'int' type data and find memory leaks. Isn't the garbage collector responsible for releasing all the memory? What are the possible ...
6
votes
5answers
931 views
Memory-safe file-reading in C
I am trying to write a single function that will read a certain number of bytes from a C file, or the entire file, based on the arguments. I want it to be memory-safe of course, and deal with ...
7
votes
1answer
127 views
A function for block allocation
During Jonathan Blow's video where he muses about a games-focused programming language, he presents C++ code that allocates a single big block of memory and has N pointers into that block. The purpose ...
1
vote
1answer
69 views
jQuery Responsive Carousel
I have developed a jQuery Responsive Carousel. When opened, the carousel in the browser and the Chrome task manager, I see that the memory usage of my page is higher than the rest of the opened tabs (...
7
votes
3answers
116 views
Type-agnostic BubbleSort in C
I'm trying out different sorting algorithms for learning purposes, here I'm doing a "type-agnostic" BubbleSort.
I modeled the function signature after the standart ...
4
votes
2answers
128 views
Does my Linklist implementation have memory leaks?
Are there any memory leaks in this linklist implementation.Also is the implementation correct?Can the time complexity be optimized?
...
6
votes
2answers
137 views
Fixed-Size Memory Pool
I've been reading about Memory Pools since I came across them in the book Game Programming Complete 4th Edition, and I decided to try and spin my own since I didn't quite understand how the one they ...
11
votes
3answers
497 views
Stack implementation with move semantics
I have implemented a basic stack just for fun. I've just started learning about move constructors and assignment and move semantics as a whole, so I would really appreciate some feedback as to whether ...
4
votes
1answer
95 views
Iterative Red-Black Tree (dynamic stack)
I've completely reworked the previous code, posted here, so that it is a bit more correct regarding dynamic memory management, and also a bit more true to the object-oriented paradigm.
...
4
votes
2answers
249 views
Memory management for Red-Black Tree
I've written this program yesterday, and I was reminded why I dreaded C++ before turning to Java: pointers and associated terms (like destructors, initializations and copy/move constructors) are ...
6
votes
1answer
312 views
Unity3D native iOS plug-in to read pedometer data
I've made a plug-in for Unity3d for iOS. The plug-in's job is to get the Pedometer data from history within a specified period of time and return that to Unity for later use. I am confident in my C# ...
1
vote
1answer
111 views
Manage process in C++
I made a fast and simple WPM (WriteProcessMemory) for Android. Any suggestion is welcome.
...