hth313 / Calypsi-tool-chains

Overview of the Calypsi tool chain and open source support packages
16 stars 0 forks source link

Configuring file stream limits #35

Closed KyleCardoza closed 6 months ago

KyleCardoza commented 9 months ago

The manual says the following:

The constant _CONFIG_NFILE_STREAMS found in <nuttx/config.h> defines the number of streams available.

I go into /usr/local/lib/calypsi-65816/src and dig around, but I don't seem to find that file, or any kind of Makefile or the like to rebuild the C library with an increased streams limit. I was wondering what I was missing in how I'm supposed to make use of this.

hth313 commented 9 months ago

That constant is no more and streams are dynamically allocated.

The library is based on NuttX. The first iteration used had this constant, a later update made it dynamic and this constant is no more. It will statically allocate the first three streams (stdin, stdout and stderr), the rest are allocated using malloc() and kept in a linked list. I will update the user guide for the next release, sorry about the confusion.

KyleCardoza commented 9 months ago

Ah. My bad. Thank you.

By the way, did you ever set up a Patreon? If so I'd love to promote it, in addition to subscribing.

hth313 commented 9 months ago

The user guide had to be updated, which I did for the next release. I have not set up a Patreon, it is something that I need to ponder more about.