answersLogoWhite

0

Generally this will be part of an error message telling you that your environment ran out of memory when it tried to execute the command at the 100th line of your code.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Is SIMM type of RAM?

Yes. A SIMM is a single in-line memory module. All this really means is that contacts on both sides of the module are redundant. SIMM was replaced with DIMM (dual in-line memory module).


How do you write a C plus plus statement to allocate memory cells dynamically and store the memory address in a pointer to an integer named gred?

int * gred ; gred = new int [100] ; // this example snippet creates 100 ints


What do you mean by off-chip memory in microcontroller?

The memory that is use externally when microcontroller works in expanded mode for special cases .


Calloc allocates a block of memory for an array of elements of a certain size?

No. The calloc function allocates a block of memory for a count of a specific type. The size of the type is already known to the compiler so does not need to be specified, it will automatically multiply the type's size by the count. With malloc, you have to allocate memory in bytes, therefore you need to calculate exactly how many bytes you will need for a given type and the number of elements of that type. Examples (allocate 100 integers): int* p = (int*) malloc (sizeof (int) * 100); int* q = (int*) calloc (int, 100); Note also that malloc does not initialise the memory whereas calloc does (the allocated memory is initialised with the value zero). As such, malloc is more efficient when you want to initialise the memory by copying from other memory. That is, there's no point initialising memory you're going to initialise manually, so long as you don't access that memory before it is initialised.


What is a malloc function in C programming with example?

The malloc() function is part of a class of functions that deal with the allocation of memory on the heap. int *a = malloc (sizeof (int) * 100); /* allocate 100 int's */ if (a == NULL) {...} /* deal with possible malloc failure */ /* use a, either as pointer or as array of 100 ints */ free (a); /* release memory back to the library */