Skip to content

'bad alloc' error #2

Description

@timjb

In my code, the line

BitmapPoppy* rs = new BitmapPoppy(bits, num_bits);

terminates with SIGABRT and the error message

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

This seems to be caused by the lines

		uint32* loc_[1ULL << 31];
		uint64  locCount_[1ULL << 31];

in bitmap.h: If I replace 31 by 30 the error is replaced by a SIGSEGV at some later point in the constructor of BitmapPoppy. I guess I just don't have that much RAM.

I am using GCC version 7.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions