How to copy char data to a smaller char already defined in memory? [closed]
Closed yesterday.
How to copy char data to a smaller char already defined in memory? [closed]
Closed yesterday.
How to copy char data to a smaller char already defined in memory? [closed]
Closed yesterday.
How to copy char data to a smaller char already defined in memory? [closed]
Closed yesterday.
Visual Studio compile error C2148 if std::new …[length] if length > 0xffffffff
I’m doing a build on Visual Studio in 64 bit mode, and get error
c2148 – total size of array must not exceed 0x7fffffff bytes,
but the actual threshold is 0xffffffff for std::new and doesn’t
appear to have a limit if using malloc instead.
I have largeaddressaware option set.
C# Construct managed object on unmanaged memory
I am trying to construct a managed object onto unmanaged memory allocated from Marshal.AllocHGlobal(). Currently, when I try to invoke the constructor delegate from reflection data, I get an exception that the object is the wrong type. I believe that if I could get a vftable pointer to the object and copy it over to the memory allocation, I could fool the language into invoking the constructor, but just getting a pointer to a static instance of the object is complicated already, and I don’t know if the vftable pointer is in the first 8 bytes let alone if I could even copy it. Is there some other way to do this without all of this crap?
issue erasing elements in a vector using C
I wanted to go “back to the basics” and try writing a C vector implementation.
It is using void* to store the data and i try to mimic the C++ counter part a little bit.
Why is garbage collector not automaticly run?
I have a simple C# service in .net 8.0.
It does some data things (e.g. getting data from a rabbit MQ event handler and saving it into a postgresDb).
C Can I use data that I freed just after freeing it
I have a linked list node I want to code a function that frees node.
But order to do that I have to update next variable of previous node.
Can I access to previous_node->next (previous_node->next->next) just after freeing it?
How to track even dynamic memory allocation for a certain class?
I understand I can provide a custom allocator for most of the stl containers. If I record memory allocations in this custom allocator, then I can keep track of memory allocations. For example, with the help of MyAllocator in std::vector<T, MyAllocator<T>>
, we can alway tell how much memory is consumed by this vector.