Skip to content

Navigation Menu

Sign in
Sign up

feat: fit the message cap, the pools, the ring and the stacks to this device - #66

Merged
DavidCozens merged 1 commit into
main from
stage-18-right-size
Aug 16, 2026
Merged

feat: fit the message cap, the pools, the ring and the stacks to this device #66
DavidCozens merged 1 commit into
main from
stage-18-right-size

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Fit the compile-time sizes to what this device uses, now that every collaborator is in place.

The message cap comes first, because the ring, the store's record buffer and the formatter frame on
both task stacks all follow it.

/* app/config/solid_syslog_tunables.h */
#define SOLIDSYSLOG_MAX_MESSAGE_SIZE 400U
#define SOLIDSYSLOG_ADDRESS_POOL_SIZE 1U
#define SOLIDSYSLOG_TCP_STREAM_POOL_SIZE 1U
#define SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE 1U

The worst case measured here is 345 octets: the four SD-ELEMENTs with both counters at full 32-bit
width and both addresses at fifteen characters, plus a short message. 400 allows for longer messages
on this device. Anything longer is truncated rather than dropped.

The pool defaults suit a device running several transports at once. This one runs a single sender
over a single stream to a single destination.

The overrides reach the library through SOLIDSYSLOG_USER_TUNABLES_FILE, which the library carries
on an INTERFACE target, so Core, the platform packs and this application all compile against the same
values. They change struct sizes, and a build where only some translation units saw them would
disagree about how big those structs are.

The ring drops from eight records to four. The store holds a backlog, so the ring only has to absorb
what can be logged while the service task is sending.

The task stacks go last, at twice their measured high-water marks rounded up to a whole
configMINIMAL_STACK_SIZE.

coderabbitai Bot commented Aug 16, 2026
edited
Loading

Copy link
Copy Markdown

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9a693119-546b-47dd-9f9b-9d7e21013d03

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Base automatically changed from stage-17-aes-gcm to main August 16, 2026 17:58
... device
Every collaborator is in place, so the compile-time sizes come down to what the
device uses.
 Flash +13,788 B (unchanged)
 RAM +36,048 B (-3,488)
 Log stack +600 B (-80)
 Service +3,688 B (-80)
The message cap comes first: the ring, the store's record buffer and the
formatter frame on both task stacks all follow it. The worst case measured here
is 345 octets — four SD-ELEMENTs with both counters at full 32-bit width and both
addresses at fifteen characters, plus a short message — and the cap is set to 400
to allow for longer messages on this device.
The ring then drops from eight records to four, the store holding the backlog.
Three pool tunables come down to one, the library's defaults being sized for a
device running several transports at once. The stacks go last, at twice their
measured high-water marks rounded up to a whole configMINIMAL_STACK_SIZE.
The overrides arrive through SOLIDSYSLOG_USER_TUNABLES_FILE, which the library
carries on an INTERFACE target, so Core, the platform packs and this application
compile against the same values. They change struct sizes, and a build where only
some translation units saw them would disagree about how big those structs are.
Nothing here changes what the device does or what protection it is under.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DavidCozens merged commit 461d271 into main Aug 16, 2026
2 checks passed

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews paused.

DavidCozens deleted the stage-18-right-size branch August 16, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /