Questions tagged [allocation]

Memory allocation is an operation of giving a program a block of memory.

1869 questions
0
votes
4 answers

size limit of allocation in c++?

I use this to allocate a 2D array in cpp: int s[n][2]; but it seems that when n is very big ( up to 1e6 ), this creates a Runtime error (exitcode: 11). How to solve this problem?
ssd
  • 83
  • 6
0
votes
3 answers

How many times are primitive data types allocated inside loops?

Here's an example: while (i < 10) { int j = 1; string k = "hello."; } j is a primitive data type and k is an object. According to Do built-in types have default constructors?, So non-class types (including fundamental…
0
votes
1 answer

Cannot allocate vector on a 33k row table merge table

I'm trying to merge the demographics table ("df_zip_demographics") from the choroplethrZip library with another table including with information by Zip codes. The table I'm trying to add to the "df_zip_demographics" is a simple two column table,…
FMarquez
  • 153
  • 1
  • 10
0
votes
1 answer

api 20+ only allows simple 1d allocations to be used with bind renderscript

I develop an application which goal is to calculate the mean of the grayscale on each column. Here is my code: mInputAllocation=Allocation.createFromBitmap(mRs, mBitmapIn.MipMapControl.MIPMAP_NONE,…
ahakkal
  • 11
  • 1
  • 6
0
votes
1 answer

Using parse.com and having allocation memory issue

I'm new to programming, I've been making an app for the last 3 months and learned a few things. But I haven't come across to how to solve this issue. I've been using Parse.com as my server, sending pictures, saving user data etc. With all of this…
Jawee
  • 145
  • 1
  • 1
  • 10
0
votes
0 answers

USB to Serial, Port Name Changing Unexpectedly

I've got a Windows 7 Pro 64 PC with a FTDI based 4 port USB to RS232 converter. I've been having periodic problems with the port name (port numbers) changing. Most recently this occurred when the USB cable got accidently yanked out of the PC while…
CMarc
  • 23
  • 2
0
votes
3 answers

problems understanding difference between double and single pointer memory allocation in C++

Ok, here i have 2 simple C++ examples, the first one is: MyClass class MyClass { private: int test; public: int member(){ test = 456; return 1; } // one public function }; global function…
rekotc
  • 595
  • 1
  • 10
  • 21
0
votes
2 answers

freeing an allocation in a struct inside a struct

When I try to free an allocation in a struct inside a struct, I get an error. How can I fix it? typedef struct card { char* sign; char* color; int number; char* name; }card; typedef struct deck { card data; deck*…
AvitalG
  • 1
  • 2
0
votes
1 answer

reallocate resources to a reduced task HPC 2012

I have 2 jobs, submitted under 2 templates in order to use priority levels. I'm using Queued Scheduling, with Graceful Pre-emption and all the automatic resource adjustment enabled. I submit the low priority job. At a later stage I allocate the…
Mack
  • 3
  • 2
0
votes
0 answers

Doubling array size of T items

I'm creating my own vector class(for an assignment) here: private: T *items; int used; Vector() { used = 0; items = new T[1000]; }; When I construct the vector and use: std::cout<
user3475821
  • 69
  • 1
  • 1
  • 5
0
votes
1 answer

Are memory addresses in assembly language statically allocated at once?

I would like to write a C-program that allocates 20,000 memory lines with each line containing 8 bytes and are labeled in the range 2500 to 24999.. The program actually simulates a simple assembly language IDE. All the 20,000 memory lines may or may…
lapita
  • 25
  • 7
0
votes
0 answers

What in my ALLOCATE is causing my integer overflow?

I have a set of code in which I declare the size of all my variables. However, I want to change them so some of the variables are allocatable. This is (what I believe) to be the relevant code of the original. parameter…
jknicely
  • 317
  • 2
  • 3
  • 10
0
votes
3 answers

c++ saving object allocation and deletion

I'm currently working on a little game, and I need somes class/struct to be allocated and deleted really often. I'm wondering it is a way to save deletion, maybe putting delete object in a container, and try to pick up in this container when i want…
Thiryn
  • 199
  • 1
  • 2
  • 12
0
votes
1 answer

Dynamic allocation for struct in c

Hello everyone this is my first question so if I do something wrong ,please forgive me. I have been trying to allocate memory for the struct I have written.definition as follows; struct newstruct* temp1; temp1 = malloc(1*sizeof(struct…
0
votes
3 answers

Allocate memory (x64 assembly)

How can I allocate memory in the Heap in x64 assembly. I want to store the value of the sidt function, but I can't seem to find a way on how to do so? I use Visual studio 2012.