Random behavior using a wrapped C library

simendsjo simendsjo at gmail.com
Wed Feb 29 01:32:45 PST 2012


On Wed, 29 Feb 2012 07:44:23 +0100, James Miller <james at aatch.net> wrote:

> On 29 February 2012 19:30, simendsjo <simendsjo at gmail.com> wrote:
>> On Wed, 29 Feb 2012 05:03:30 +0100, Mike Parker <aldacron at gmail.com>  
>> wrote:
>>
>>> On 2/29/2012 1:10 AM, simendsjo wrote:
>>>>
>>>> On Tue, 28 Feb 2012 16:58:13 +0100, Trass3r <un at known.com> wrote:
>>>>
>>>>> http://d.puremagic.com/issues/show_bug.cgi?id=5570
>>>>
>>>>
>>>> Thanks. I've literally spent hours testing various things without any
>>>> luck - would have been simpler if I knew asm :/
>>>>
>>>> A blocker for using x64 on linux then.
>>>
>>>
>>> Have you tested on 32-bit yet? I had the exact same problem with one  
>>> of my
>>> wrappers when passing a struct by value, but on 32-bit Windows.  
>>> Luckily, in
>>> my case it was simple enough to implement the function in D to work  
>>> around
>>> it. I'm curious to know if it's related.
>>
>>
>> Yes. Tested on x32, and it works just fine. I'll use ia32libs and -m32  
>> for
>> the time being then.
>>
>> A strange thing is that memory consumption went _up_ when everything was
>> compiled as x32.
>
> I don't know much, but wouldn't bigger register sizes mean that less
> data needs shuffled in and out of memory? Resulting in less
> instructions and therefore less memory usage?
>
> I'm just guessing though
>
> --
> James Miller

Probably. Almost everything is done using structs right now. Guess it will  
be quite different when I get a lot of classes bouncing around.


More information about the Digitalmars-d-learn mailing list