Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the structure to be initialized as all zeros #44

Merged
merged 2 commits into from
Dec 8, 2019
Merged

Conversation

jamesmunns
Copy link
Owner

@jamesmunns jamesmunns commented Dec 8, 2019

This PR changes the structure initialization so that all fields can always initially be zero, and therefore reside entirely within .bss.

Notably, this changes the last tracking pointer to be initially zero, and tweaks the write commit logic to handle this gracefully.

Closes #43

With this code:

static BUFFY: BBBuffer<U4096> = BBBuffer( ConstBBBuffer::new() );

Before:

   text	   data	    bss	    dec	    hex	filename
  18934	   4136	      4	  23074	   5a22	timer-uart

After:

   text	   data	    bss	    dec	    hex	filename
  18926	     16	   4120	  23062	   5a16	timer-uart

CC jonas-schievink/rubble#100

@jamesmunns
Copy link
Owner Author

@jonas-schievink @Chocol4te could you please confirm this addresses the issue for you as well? If so I'll merge this and release it as 0.4.1

@jamesmunns jamesmunns added this to the v0.4.x milestone Dec 8, 2019
@fmckeogh
Copy link

fmckeogh commented Dec 8, 2019

Just tested with an nRF52810, confirmed that it is in bss with arm-none-eabi-size :)

@jamesmunns jamesmunns merged commit 09109d1 into master Dec 8, 2019
@jamesmunns jamesmunns deleted the all-bss branch September 14, 2021 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BBQueue backing storage is put in .data instead of .bss
2 participants