Menu
Home
Create new Paste
Log in
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
module qedge; class edge(T) { edge next; T* data; } alias edge!int iedge; alias iedge[4] qedge; import std.stdio; import std.c.stdlib; void main() { writeln(iedge.sizeof); // 8 writeln(qedge.sizeof); // 32 // need something for the next line, which always returns address, divisible by 32 qedge* q = cast (qedge*) malloc(qedge.sizeof); writeln(q); // ex. 0x10429A0 = 17050016, which is, does not start at 32-byte boundary }
Result:
Success
/
Return code: 0
/
Compilation time:
0.712
seconds
/
Run time:
0.001
seconds
Disassembly
Application output:
8
32
1679E990
Username
Message
reCAPTCHa
Add comment
Paste info
Author:
Guest
Views:
129
Private:
no
Expires:
Never
Uploaded:
08.07.12 16:53
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.063
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason