× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yeah, that's what I was about to ask..  why not use the routine that I coded in YAJLR4 (yajl_stdin_load_tree) -- but, I see you found that.

If you do want to do it yourself instead of using my routine... if the problem is simply that you're running out of automatic storage, well...  then don't use automatic storage, use heap storage.   To do that, define your variable so that it is based on a pointer, and then use the %ALLOC BIF to allocate memory to it. Once you've done that, you can use QtmhRdStin (or QtmhWrStout as needed) to work with the variable.   Just make sure you use DEALLOC to free up the memory when you're done.

Allocated memory comes from the heap rather than from automatic storage, so shouldn't be a problem.

If you need to exceed the 16mb (approx) limit of single-level storage, instead of using %ALLOC/DEALLOC, you can also use the system APIs to allocate/free memory in teraspace.  This does NOT require changing your program's storage model to teraspace, but still allows the larger memory size.

But if you're happy with using my routine in YAJLR4, use that... then you don't have to worry about dynamic memory.

Writing it to an IFS file would work too...  but would be slower, and is overkill in this case.

On 3/19/2024 7:02 PM, Justin Taylor wrote:
If I'm reading it right, yajl_stdin_load_tree() in YAJL does exactly what
I'm looking for.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.