Reporting correct space usage for TrueNAS samba shares
TrueNAS is a great and mature piece of software. By leveraging the ZFS filesystem and providing access to the data using various protocols along with a simple, easy to use webinterface, it has become the defacto standard for SOHO self built NAS systems. By default the windows shares exposed by samba on TrueNAS will show a correct, but unintuitive space estimate. The issue is that shares, even if they belong to the same pool, will report different volume sizes when mounted on a client.
Don't capture in a coroutine lambda
Mixing lambda functions and C++20 coroutines can be risky if done incorrectly. One important issue is the lifetime of variables captured in a lambda.
SIM7000E | Converting Libraries
As I already mentioned in a previous post, the simcom module allows you run your own code right inside the chip. This allows for some pretty interesting applications and reduces external components to a minimum. However the libraries which are used to interface to the kernel running inside the module are only provided as a ARMCC version which makes them quite hard to use with a more standard compiler like GCC. Because of this I developed an open source variant which allows compilation with gcc and can be modified as needed to add more features.
SIM7000E
An IoT module with potential
SIM7000E is a Cellular module which supports 2G as well as LTE CAT-M1 and LTE NB-IoT produced by Simcom. In addition to a modem, the module integrates a GNSS receiver which allows it to find its position using GPS, Galileo, Beidou and Glonass. Unlike most other modules with similar features, however, it does not require a separate processor which allows smaller and cheaper devices.
How much memory is required for malloc(0) ?
Why doing nothing is inefficient.
At first glance, the answer seems clear: A request to allocate no memory should not require any memory at all. However, it is easily possible to exhaust all available memory without ever allocating more than zero bytes. But before we take a look at malloc(0) lets first check the simpler case of malloc(1).