[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] Invalid memory address

From: Anton Ertl
Subject: Re: [gforth] Invalid memory address
Date: Wed, 23 Mar 2016 18:57:33 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Mar 22, 2016 at 10:27:33PM -0400, Mario Beaulieu wrote:
> Hi,
> Is there a maximum number of items that can be passed on the data stack as 
> parameters to a c-function? I'm calling a function with 13 parameters and, at 
> execution time I get an "Invalid memory address" message and the program 
> stops.

There is no planned limit.  I just tried a C function wrapper with 13
parameters, and it worked:

c-library xxx
\c #define test1(n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13) 
c-function test1 test1 n n n n n n n n n n n n n -- n

2 2 2 2 2 2 2 2 2 2 2 2 2 test1 .

> The function is part of a C library (wiringPi on the Raspberry Pi) that is 
> used by a large public. All other c-functions work fine.

We may be able to help more if you post the source code; the prototype
of the C function may also help.

- anton

reply via email to

[Prev in Thread] Current Thread [Next in Thread]