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

Update of MemoryPool.h header file. #4941

Merged
merged 1 commit into from Aug 24, 2017

Conversation

Projects
None yet
7 participants
@mprse
Member

mprse commented Aug 21, 2017

Provide fix for pool buffer size.
Add assertion to forbid creation of MemoryPool object with queue size equal to 0.
Update of free() function description.

Description

Provide updates in MemoryPool.h file.

Status

Ready

Migrations

Fix in MemoryPool.h provides availability to create MemoryPool objects for types which sizes are not multiple of 4 bytes (fix alignment issue).

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 21, 2017

rtos/MemoryPool.h Outdated
@@ -92,7 +96,8 @@ class MemoryPool : private mbed::NonCopyable<MemoryPool<T, pool_sz> > {
private:
osMemoryPoolId_t _id;
osMemoryPoolAttr_t _attr;
char _pool_mem[sizeof(T) * pool_sz];
/* osMemoryPoolNew requires that pool block size is a multiple of 4 bytes. */
char _pool_mem[ ((sizeof(T) + 3) & ~3) * pool_sz];

This comment has been minimized.

@0xc0170

0xc0170 Aug 21, 2017

Member

nit: remove the space after [

@mprse mprse force-pushed the mprse:fix_mem_pool_header_file branch 3 times, most recently Aug 21, 2017

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 21, 2017

@mprse Could you include more detail in the commit message and PR title? I don't know what you are updating when you just say that you update.

Fix pool buffer size, update free() description, add assertion in Mem…
…oryPool.h header file.

Provide fix for pool buffer size: pool block size must be
a multiple of 4 bytes.
Add assertion to forbid creation of MemoryPool object with queue size equal to 0.
Update description of free() function. Add information about
statuses returned by this function.
@SenRamakri

This comment has been minimized.

Contributor

SenRamakri commented Aug 21, 2017

I'm proposing a different fix for this issue in CMSIS repo, please see the below URL with description.
ARM-software/CMSIS_5#231

Once/If that gets through we have to make changes to mbed-os repo to use the new alignment macro instead of hard-coding the alignment in MemoryPool.h which creates memory alignment knowledge duplication. In case, it doesn't get through we can use the solution in this PR as short-term fix.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 22, 2017

I'm proposing a different fix for this issue in CMSIS repo, please see the below URL with description.
ARM-software/CMSIS_5#231

👍 Thanks for going upstream, let's wait for CMSIS team review

@bulislaw

I think we are good to go with this one, no need to wait. Even if the macro gets merged to CMSIS it won't be available in mbed OS till we bring an update.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 22, 2017

/morph test

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Aug 23, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 23, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1083

Test Prep failed!

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 23, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 23, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1095

All builds and test passed!

@theotherjimmy theotherjimmy merged commit 3e00a22 into ARMmbed:master Aug 24, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

exmachina-auto-deployer pushed a commit to exmachina-dev/mbed-os that referenced this pull request Sep 13, 2017

Merge tag 'mbed-os-5.5.6' of github.com:ARMmbed/mbed-os into 5.5.6
mbed OS 5.5.6 release

We are pleased to announce the [mbed OS 5.5.6
release](https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.5.6)
is now available.

This release includes ...

Known Issues

The following list of known issues apply to this release:

Contents

Ports for Upcoming Targets

[4608](ARMmbed#4608)
Support Nuvoton's new target NUMAKER_PFM_M487

[4840](ARMmbed#4840)
Add Support for TOSHIBA TMPM066 board

Fixes and Changes

[4801](ARMmbed#4801)
STM32 CAN: Fix issue with speed function calculation

[4808](ARMmbed#4808)
Make HAL & US tickers idle safe

[4812](ARMmbed#4812)
Use DSPI SDK driver API's in SPI HAL driver

[4832](ARMmbed#4832)
NUC472/M453: Fix several startup and hal bugs

[4842](ARMmbed#4842)
Add call to DAC_Enable as this is no longer done as part

[4849](ARMmbed#4849)
Allow using of malloc() for reserving the Nanostack's heap.

[4850](ARMmbed#4850)
Add list of defines to vscode exporter

[4863](ARMmbed#4863)
Optimize memory usage of wifi scan for REALTEK_RTW8195AM

[4869](ARMmbed#4869)
HAL LPCs SPI: Fix mask bits for SPI clock rate

[4873](ARMmbed#4873)
Fix Cortex-A cache file

[4878](ARMmbed#4878)
STM32 : Separate internal ADC channels with new pinmap

[4392](ARMmbed#4392)
Enhance memap, and configure depth level

[4895](ARMmbed#4895)
Turn on doxygen for DEVICE_* features

[4817](ARMmbed#4817)
Move RTX error handlers into RTX handler file

[4902](ARMmbed#4902)
Using CMSIS/RTX Exclusive access macro

[4923](ARMmbed#4923)
fix export static_files to zip

[4844](ARMmbed#4844)
bd: Add ProfilingBlockDevice for measuring higher-level applications

[4896](ARMmbed#4896)
target BLUEPILL_F103C8 compile fix

[4921](ARMmbed#4921)
Update gcc-arm-embedded PPA in Travis

[4926](ARMmbed#4926)
STM32L053x8: Refactor NUCLEO_L053R8 and DISCO_L053C8 targets

[4831](ARMmbed#4831)
Remove excessive use of printf/scanf in mbed_fdopen/_open

[4922](ARMmbed#4922)
bug fix: xdot clock config

[4935](ARMmbed#4935)
STM32: fix F410RB vectors size

[4940](ARMmbed#4940)
Update mbed-coap to version 4.0.9

[4941](ARMmbed#4941)
Update of MemoryPool.h header file.

You can fetch this release from the [mbed-os
GitHub](https://github.com/ARMmbed/mbed-os) repository,
using the tag "mbed-os-5.5.6".

Please feel free to ask any questions or provide feedback on this
release [on the forum](https://forums.mbed.com/),
or to contact us at [support@mbed.org](mailto:support@mbed.org).

@mprse mprse referenced this pull request Sep 22, 2017

Merged

Add MemoryPool test. #4936

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment