]> sigrok.org Git - libsigrok.git/commit
asix-sigma: Remove stack-based alloc in download_capture()
authorMarek Vasut <redacted>
Sun, 20 Apr 2014 19:34:36 +0000 (21:34 +0200)
committerBert Vermeulen <redacted>
Wed, 30 Apr 2014 16:45:51 +0000 (09:45 -0700)
commitfd830beb6751a966a0f12a9ca48a8550bbe5bbba
tree08cf78e5f711d4ded571a6abd58f46e24a3481ca
parent462fe786641df67e99d67f0f7031e7ca76430981
asix-sigma: Remove stack-based alloc in download_capture()

Avoid allocating 32KiB of data on stack in download_capture(). Instead,
do a glib-variant of calloc(1, ) to allocate the data for the samples
which will be downloaded. This avoids explosions of stack on systems
with tight stack limits.

Furthermore, define structures describing the organisation of Sigma's
DRAM memory and start using those instead of ad-hoc preprocessor macros
defining the sizes of various structures in memory.

Signed-off-by: Marek Vasut <redacted>
hardware/asix-sigma/asix-sigma.c
hardware/asix-sigma/asix-sigma.h