Skip to content

Commit

Permalink
Can oom (#389)
Browse files Browse the repository at this point in the history
reduce queue size to resolve memory errors. Tests updated as well. Temporary update to alleviate some of #388.
  • Loading branch information
emarsman authored Jun 19, 2017
1 parent 6053605 commit fff25c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/tests/canread_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,15 @@ START_TEST (test_translate_many_signals)
{
getConfiguration()->pipeline.uart = NULL;
ck_assert_int_eq(0, SENT_BYTES);
for(int i = 7; i < 23; i++) {
for(int i = 7; i < 19; i++) {
can::read::translateSignal(&getSignals()[i],
&TEST_MESSAGE, getSignals(), getSignalCount(), &getConfiguration()->pipeline);
fail_unless(getSignals()[i].received);
}
fail_unless(USB_PROCESSED);
// 8 signals sent
ck_assert_int_eq(15 * 34 + 2, SENT_BYTES);
// 6 in the output queue
// 8 signals sent - depends on queue size
ck_assert_int_eq(11 * 34 + 2, SENT_BYTES);
// 1 in the output queue
fail_if(queueEmpty());
ck_assert_int_eq(1 * 34, QUEUE_LENGTH(uint8_t, OUTPUT_QUEUE));
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/bytebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "emqueue.h"
#include "commands/commands.h"

QUEUE_DECLARE(uint8_t, 512)
QUEUE_DECLARE(uint8_t, 384)

namespace openxc {
namespace util {
Expand Down

0 comments on commit fff25c8

Please sign in to comment.