Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -10,18 +10,18 @@
|
|||
enum int nInts = 10; // Compile-time constant.
|
||||
|
||||
// This is thread-local:
|
||||
int data1[nInts];
|
||||
int[nInts] data1;
|
||||
|
||||
// This is global:
|
||||
__gshared int data2[nInts];
|
||||
__gshared int[nInts] data2;
|
||||
|
||||
void main() {
|
||||
// Static memory, it's thread-local but its name is usable
|
||||
// only locally:
|
||||
static int data3[nInts];
|
||||
static int[nInts] data3;
|
||||
|
||||
// Static memory, it's global but its name is usable only locally:
|
||||
__gshared static int data4[nInts];
|
||||
__gshared static int[nInts] data4;
|
||||
|
||||
// ----------------------
|
||||
// D supports the functions that manage memory of the C heap:
|
||||
|
|
|
|||
1
Task/Memory-allocation/Maple/memory-allocation-1.maple
Normal file
1
Task/Memory-allocation/Maple/memory-allocation-1.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
a := Array( 1 .. 10^6, datatype = integer[1] ):
|
||||
1
Task/Memory-allocation/Maple/memory-allocation-2.maple
Normal file
1
Task/Memory-allocation/Maple/memory-allocation-2.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
unassign( a ):
|
||||
1
Task/Memory-allocation/Maple/memory-allocation-3.maple
Normal file
1
Task/Memory-allocation/Maple/memory-allocation-3.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
a := 'a':
|
||||
Loading…
Add table
Add a link
Reference in a new issue