Re: memory leak (well, kind of...) ?
Posted in 1993
Oyvind Gjerstad writes: |> >>> 4GL run-time error number -4518. The 4GL program cannot |> >>> allocate any more space for temporary string storage. |> |> This very simple esql/c program demonstrates this: |> main() { for(;;) retquote("foo"); } Well, I'm no 4gl grind, but I suspect that, since you are calling this function in the context of an esql/c program, that there is no 4gl stack to work with! So you are attempting to push the return value onto a stack that does not exist. Granted, the error message is a bit misleading. I suggest you take a look at the 4GL Supplement manual, pages S-192-204, which covers calling 4gl functions from c. Among other things, you need to call fgl_start() to initialize the 4gl stack, fgl_call() to call the 4gl function, and fgl_end() to free the stack up. Dave Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney