Skip to content

Get rid of dynamic memory allocations in libnrsc5? #457

@argilo

Description

@argilo

libnrsc5 allocates memory using malloc in various places. For instance, the convolutional decoder allocates a relatively large trellis object at the start of each decode, and frees it when finished. Each memory allocation opens up the possibility of an allocation failure, and in many cases libnrsc5 fails to check the return value of malloc.

Since most things in the NRSC-5 standard are of fixed or bounded size, I expect that hardware receivers use a static memory layout. It may be worth taking this approach in libnrsc5 as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions