Commit Graph

25 Commits (7f7bbfe2613d56b8bad24ce23bd35923fb1710ea)

Author SHA1 Message Date
Arto Kinnunen a563970cf6 Merge commit '7d51801c764efdcd155d7f3f0ca4213a9946704b' into nanostack_rel_14_0_0
* commit '7d51801c764efdcd155d7f3f0ca4213a9946704b':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 260d80f42d..c343e4e2cc
2021-06-22 12:29:14 +03:00
Arto Kinnunen 6b10857889 Squashed 'features/frameworks/nanostack-libservice/' changes from a526cc3f41..260d80f42d
260d80f42d Update ns_nvm_helper license text and format (#98)

git-subtree-dir: features/frameworks/nanostack-libservice
git-subtree-split: 260d80f42da24fa41656222294abc38f7779bdcf
2021-04-15 12:22:16 +03:00
Arto Kinnunen eae31b3add Merge commit '6b10857889dfa2b3646866e3daf68502c78e7722' into nanostack_release_13_0
* commit '6b10857889dfa2b3646866e3daf68502c78e7722':
  Squashed 'features/frameworks/nanostack-libservice/' changes from a526cc3f41..260d80f42d
2021-04-15 12:22:16 +03:00
Arto Kinnunen df0d0e1b81 Squashed 'features/frameworks/nanostack-libservice/' changes from 67d7b93ec6..a526cc3f41
a526cc3f41 Merge pull request #97 from PelionIoT/sync_from_mbed_os
2f82569918 Add license notice to Arm copyrighted source files
ad7631083a Merge pull request #96 from PelionIoT/heap_lite_stats
18b742b2c7 Heap stat's enabled allways by default.
9b4cbaf101 Added extended block list to dynamic memory tracker (#95)
8ff6d31abb Added dynamic memory tracker and hooks to dynmem library (#93)
cf2b133082 Merge pull request #92 from LDong-Arm/add_present_flag
9eb6f2dde7 Add config to generate macro MBED_CONF_NANOSTACK_LIBSERVICE_PRESENT

git-subtree-dir: features/frameworks/nanostack-libservice
git-subtree-split: a526cc3f41bfd0ec6a78e6998b8f8dcc1bd2afc9
2021-01-21 11:12:10 +02:00
Arto Kinnunen 8a5f0f6d65 Merge commit '540d82c2785e100d170104efe90016257040355d' into feature-wisun
* commit '540d82c2785e100d170104efe90016257040355d':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 67d7b93ec6..ad7631083a
2020-12-14 10:44:46 +02:00
Mika Leppänen a9746a563a Added extended block list to dynamic memory tracker
If same allocator (alloc call) allocates multiple dynamic memory blocks,
the additional blocks are added to extended memory block list, and
the allocator list reference count and total sizes are increased.
When statistics are calculated, it is only needed to process the
allocator list, not the whole memory block list.

Added also optional hash function to calculate the (start) index where
memory block information is stored on extended memory block list. Hash
is calculated from memory block address.

It is expected that hash distributes the free index searches evenly
to whole memory area allocated for extended memory block list. So if
area is large enough, in most cases the index pointed by the hash, or
the index few indexes from that, should be empty and available for use.
Similarly, when memory block is freed, the search for the block on
the extended memory block list, starts from the index pointed by the
hash.

If hash is not used, extended memory block list searches start always
from index 0.
2020-11-18 17:31:41 +02:00
Mika Leppänen 5c24b26940 Added nanostack dynamic memory tracker and hooks to dynmem library
Nanostack dynamic memory tracker tracks memory allocations. It has following
interface:

ns_dyn_mem_tracker_lib_alloc: is called on alloc

ns_dyn_mem_tracker_lib_free: is called on free

ns_dyn_mem_tracker_lib_step: updates the lifetime of individual memory
blocks (is used to detected which blocks are permanent and which
have been allocated lately)

ns_dyn_mem_tracker_lib_allocator_lists_update: updates allocator lists,
there are lists for top allocators, permanent allocators and allocators
going to permanent allocators list

ns_dyn_mem_tracker_lib_max_snap_shot_update: can be used to update memory
maximum usage snap shot, this can be called on alloc if snap shot is
needed
2020-11-16 10:20:36 +02:00
Arto Kinnunen 1df883563d Merge commit 'e13417d3ce12469f3418ade4bf1183993083efdd' into mbed-os-5.15
* commit 'e13417d3ce12469f3418ade4bf1183993083efdd':
  Squashed 'features/frameworks/nanostack-libservice/' changes from c6cae6992a..67d7b93ec6
2020-08-18 12:09:08 +03:00
Arto Kinnunen 4c4af375af Merge commit '4d8c88d1f3b4f99bce35d737db58fd74436adf6f' into feature-wisun
* commit '4d8c88d1f3b4f99bce35d737db58fd74436adf6f':
  Squashed 'features/frameworks/nanostack-libservice/' changes from c6cae6992a..67d7b93ec6
2020-08-17 17:15:17 +03:00
Arto Kinnunen 2c16a69cdc Merge commit 'db42dca51cea37a6ea2dfab1aedbbb6ac7ab10ee' into mbed-os-5.15
* commit 'db42dca51cea37a6ea2dfab1aedbbb6ac7ab10ee':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 9a61e73787..c6cae6992a
2020-06-08 14:26:15 +03:00
Arto Kinnunen cb94e609e1 Merge commit '4b041bf749b46884727bf627a1a73da6d756ccd9' into feature-wisun
* commit '4b041bf749b46884727bf627a1a73da6d756ccd9':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 9a61e73787..c6cae6992a
2020-05-11 11:49:01 +03:00
Arto Kinnunen 3c5613a4e2 Merge commit '316948e8997cd18891c1e06b4648da0001ceb794' into feature-wisun
* commit '316948e8997cd18891c1e06b4648da0001ceb794':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 9af756886f..9a61e73787
2020-02-26 13:22:02 +02:00
Arto Kinnunen e7e75accaa Merge commit 'db389d4b4b3cf6cf080926399bef2584ab896ba1' into nanostack_for_mbedos_5_15
* commit 'db389d4b4b3cf6cf080926399bef2584ab896ba1':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 9af756886f..9a61e73787
2020-02-21 10:54:43 +02:00
Seppo Takalo a7634a1e5a Include ns_types.h before mbed_trace.h in Nanomesh 2019-09-06 13:05:19 +03:00
Arto Kinnunen 51d37d5da4 Merge commit '8730005927c6e12a78957c2eda92dc5a9698cdea' into nanostack_libservice_update
* commit '8730005927c6e12a78957c2eda92dc5a9698cdea':
  Squashed 'features/frameworks/nanostack-libservice/' changes from dd98c37..9af7568
2019-07-05 10:44:37 +03:00
Kevin Bracey 5c3b15cf81 ns_list: avoid UINT_FAST8_MAX
Prevent compilation issues when someone has included <stdint.h> before
a header file that needs to include <ns_list.h>.

Some toolchains like ARM C 5 will not provide UINT_FAST8_MAX in C++
unless __STDC_LIMIT_MACROS is defined, and if this was not defined the
first time <stdint.h> was included, it's too late.

We can get the maximum value for our unsigned list offset by casting -1
to it, thanks to modulo arithmetic.
2019-06-11 17:13:27 +03:00
Arto Kinnunen 3b1ccfac0a Merge commit 'd53d1dffb7405776dd84fa24a2eec7c18f445fed'
* commit 'd53d1dffb7405776dd84fa24a2eec7c18f445fed':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 1d4c358..dd98c37
2019-02-25 13:00:32 +02:00
Seppo Takalo 43a53df505 Fix ns_list for C++03 compilers, like IAR 7 2019-02-06 15:26:06 +02:00
Mikhail Maltsev 5c351dc6ae Fix C++11 build with Arm Compiler 6
Currently there are two issues which prevent building Mbed OS with
-std=gnu++11 when using Arm Compiler 6:
* NanostackRfPhys2lp.cpp contains a narrowing conversion in a braced
  initializer list
* ns_types.h includes <stdalign.h> which Arm Compiler 6 currently
  does not provide

This patch fixes both issues. The first one is fixed by changing the
underlying type of the corresponding enumeration when the code is
compiled as C++11. The second issue is worked around by avoiding the
use of <stdalign.h> header for Arm Compiler versions prior to 6.12.
2018-11-26 12:54:51 +00:00
Arto Kinnunen 923ce138f5 Merge commit '661681f65c3fb61aec2e4605bef0fc075cc8cb0d' into mbedos511
* commit '661681f65c3fb61aec2e4605bef0fc075cc8cb0d':
  Squashed 'features/frameworks/nanostack-libservice/' changes from bb56e37..1d4c358
2018-11-10 20:14:25 +02:00
Arto Kinnunen 66620a2761 Merge commit '0ca91df5905111270a6ec1343be5c726c97fe571' into mbedos511
* commit '0ca91df5905111270a6ec1343be5c726c97fe571':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 5eb2f3f..bb56e37
2018-11-05 14:17:48 +02:00
Arto Kinnunen 1dac676833 Merge commit '7d2f0cab63a2223a426c44e13f771abe6a7d7eaf'
* commit '7d2f0cab63a2223a426c44e13f771abe6a7d7eaf':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 2705b9b..5eb2f3f
2018-10-05 13:09:29 +03:00
Arto Kinnunen 3d5010de12 Merge commit 'a184ff592b547f153aa14c99329f65fd18515b0d'
* commit 'a184ff592b547f153aa14c99329f65fd18515b0d':
  Squashed 'features/frameworks/nanostack-libservice/' changes from ddd45db..2705b9b
2018-07-02 13:15:58 +03:00
Juhani Puurula 7c38f19745 Merge commit 'd6732a1b96814a2ea635b3d517f498127843a097'
* commit 'd6732a1b96814a2ea635b3d517f498127843a097':
  Squashed 'features/frameworks/nanostack-libservice/' changes from 09056ed..ddd45db
2018-05-11 09:59:29 +03:00
Seppo Takalo d1c6bc0913 Get rid of FEATURE_COMMON_PAL
Nanostack related files moved under 'feature/nanostack'
Common libraries moved to 'features/frameworks'

Allow FEATURE_COMMON_PAL still to be defined in the build so
that we don't break any builds.
2018-04-27 14:38:43 +03:00