» Home » allocation » Page 1
design class aggregation - stack allocation vs dynamic memory allocation
by Londo_Jowo in Programming Languages

Please have a look at the two simplified examples of designing a class aggregation below.

Solution 1


// need include, forward declaration is not enough
#include "door.h"
class CGarage
CGarage(const std::string &val);
CDoor m_door;



C++ Object Block Allocation vs Individual Allocation
by Mahesh in Network & Servers

what is the major difference with block allocation vs individual object allocation. let say

int iCount = 5;
int i = 0;
while(i < iCount)
f = new foo();
foo* f = new foo[iCount];

will that second method save some memory space for me?.
i heard that every object we allocated surround

C++ Which is faster: Stack allocation or Heap allocation
by tamizhvendan in Network & Servers

This question may sound fairly elementary, but this is a debate I had with another developer I work with.

I was taking care to stack allocate things where I could, instead of heap allocating them. He was talking to me and watching over my shoulder and commented that it wasn't necessary because they are the same performance wise.

I was always under the impression that gro

C# Memory allocation/de-allocation question regarding scope
by Andrew S. in Programming Languages

I was recently going through a garbage collection article and decided to play along and attempt to gain a greater understanding. I coded the following, playing around with the using statement, but was surprised with the results... I expected e.Parent.Name outside of the using block to go ka-blooey.

What exactly is going on here?

static void Main(string[]

In java Can objects be created with both static memory allocation and dynamic memory allocation?
by Kavoos in Java

In java Can objects be created with both static memory allocation and dynamic memory allocation?

What Is Tip Allocation?
by John G in Personal Finance
Certain businesses in the food service industry whose employees regularly receive tips must ensure that these tips meet certain requirements, and reimburse their employees if they do not. This is called tip allocation. Businesses AffectedTip allocation is required for any business classified as a "large food or beverage establishment." The IRS defines such an establishment as any food or bevera
TAGS : What Allocation

Processes Allocation in .Net
by TreVader in Development Tools & Services

I'm writing some program which should perform calculations concurrently according to inputs which reach the system all the time. I'm considering 2 approaches to allocate "calculation" processes:

Allocating processes in the system initialization, insert the ids to Processes table, and each time I want to perform calculation, I will check in the table which process is free.
The que

c++ string allocation
by Jonathan in Programming Languages

do I need to take care of memory allocation, scope and deletion about c++ "string" object?

for example:

#include <string>
const char* func1() {
const char* s = "this is a literal string";
return s;
string func2() {
string s = "this is a literal string";
return s;
const char* func3() {
string s

How much is too much memory allocation in NDK?
by codelurker in Programming Languages

The NDK download page notes that, "Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on."

I came from a C background and was excited to try to use the NDK to operate most of my OpenGL ES functions and any native functions related to physics, animation of vertices, et

Memory Allocation in JVM
by greggerz in Programming Languages

I am thinking about memory allocation in Java i.e in which
memory location methods, fields and objects are stored.

Suppose I have 2 classes

import java.util.*;
class ABC
int field;
class XYZ
int x,y,z;
static int p;
void fun(ABC a){
a.field = 10;
a.l = new ArrayLi

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .