I have this (compiling) code: Are the vectors inside A and B taken care of by the compiler? Afaik to destroy an object allocated like A and B, I wo ...
I have this (compiling) code: Are the vectors inside A and B taken care of by the compiler? Afaik to destroy an object allocated like A and B, I wo ...
I've written a small working plugin server. The plugins are implemented using .so shared objects, which are manually loaded during runtime in the "ser ...
I'm trying to figure out how alloca() actually works on a memory level. From the linux man page: The alloca() function allocates size bytes of spa ...
I have a main function for my app, and I allocate, for example, paths to configuration files, etc. Currently I use malloc for them, but they are never ...
I'm updating an old C++ DLL project. For one of the exported functions there's The W2A macro is defined as Visual Studio 2019 flags the W2A macr ...
The GCC C++ compiler (any many other C++ compilers as well) provide nonstandard extentions such as alloca() for stack based allocation variable ...
The code above is not accepting the else condition and not printing the message despite entering the stored value i.e. 23. Please help me understan ...
I'm trying to implement my own math library, and I'm starting off with vectors. The idea is to give the class a pointer to an array of numbers, then c ...
I have this simple code in c I would expect that generated assembly code for alloca function would just decrement stack pointer(one sub instruction ...
I'm using alloca a lot these days, to allocate temporary buffers. In my application (signal processing) this is a common need. The question is: When ...
Why calling alloc( ) as a parameter to another function call like this func(x, alloca(size), z); is considered wrong According to a book called the li ...
When I run this code, I get this error per call: I'm using Visual C++ 2019, both stdc++14 and stdc++17 produce the same error. What's wrong wit ...
(GNU) C offers at least two mechanisms for manipulating variable data on stack - the first one is the alloca function and its relatives (e.g. strdupa) ...
I am very new to assembly and I am currently reading a book called Reverse Engineering for Beginners and I got to the part that talks about memory all ...
I am trying to port a C (not C++) program from GCC to Visual Studio. The GCC specific function strdupa() is widely used in this program. Is there any ...
In the process of writing some testing and analysis of a large code base, I have to replace thousands of calls to alloca() with my own method. On my t ...
Background (there may be a better way to do this): I am developing a Julia library in which I manually manage memory; I mmap a large block, and then m ...
Memory allocated by malloc can be reallocated with realloc. Is there a similar function for alloca? Reallocating stack memory could be useful when you ...
How can I allocate memory on the stack and have it point to different memory addresses so I can use it later? For example. this code: Will print ou ...
I am trying to write a function that is passed a function to use for allocation as its argument; it should accept any valid allocator of type void *(* ...