On Wednesday, 27 September 2017 at 21:44:48 UTC, Ali Çehreli
wrote:
On 09/27/2017 02:39 PM, timvol wrote:
[...]
void main() {
auto mem = new ubyte[1024+15];
auto ptr = cast(ubyte*)(cast(ulong)(mem.ptr + 15) &
~0x0FUL);
auto arr = ptr[0..1024];
}
Ali
Works perfect. Thank you!
Hi guys,
how can I allocate an (e.g. 16) byte aligned array?
In C I can do the following:
void *mem = malloc(1024+15);
void *ptr = ((uintptr_t)mem+15) & ~ (uintptr_t)0x0F;
memset_16aligned(ptr, 0, 1024);
free(mem);
I think in D it looks similar to this:
auto mem = new ubyte[
Hi guys,
I want execute a process. I know, I can execute a process using
"spawnProcess" or "executeShell". But I want exit the parent.
My code for testing purposes is the following:
int main(string[] asArgs_p)
{
if ( (asArgs_p.length >= 2) && asArgs_p[1].isDir() )
{
while(1) {
On Wednesday, 21 June 2017 at 20:48:52 UTC, ag0aep6g wrote:
On 06/21/2017 09:39 PM, timvol wrote:
size_t calcLength(ubyte ubFuncCode)() if ( ubFuncCode ==
1 )
{
return 10; // More complex calculated value
}
size_t calcLength(ubyte ubFuncCode)() if ( ubFuncCode ==
Hi! I've a simple array of bytes I received using sockets. What I
want to do is to calculate the target length of the message. So,
I defined a calcLength() function for each function code (it's
the first byte in my array). My problem is that I defined the
calcLength() function using conditions
On Tuesday, 4 April 2017 at 19:59:19 UTC, Dragos Carp wrote:
On Tuesday, 4 April 2017 at 18:42:45 UTC, timvol wrote:
Hi guys,
I'm trying to cross-compile a project using CMake and gdc (or
better: the gdmd port). My CMakeLists-file is the following:
For cross-compiling, CMake uses a so call
On Tuesday, 4 April 2017 at 19:59:19 UTC, Dragos Carp wrote:
On Tuesday, 4 April 2017 at 18:42:45 UTC, timvol wrote:
Hi guys,
I'm trying to cross-compile a project using CMake and gdc (or
better: the gdmd port). My CMakeLists-file is the following:
For cross-compiling, CMake uses a so call
Hi guys,
I'm trying to cross-compile a project using CMake and gdc (or
better: the gdmd port). My CMakeLists-file is the following:
cmake_minimum_required(VERSION 2.8.1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake-d")
SET(CMAKE_SYSTEM_NAME Linux)
project(myapp D)