ThrowTheSwitch / CMock

CMock - Mock/stub generator for C
http://throwtheswitch.org
MIT License
652 stars 269 forks source link

CMock has run out of memory #431

Closed roxysosa closed 1 year ago

roxysosa commented 1 year ago

Hi, I'm running a test where i have to allocate memory dicamicaly while is runing the test
while x< 4000 funtion_CMockExpectAndReturn(1,arr,0) ....

so i try to add compiler option: CMOCK_MEM_DYNAMIC in the yml proyect as a flag, but I'm not sure how to do it . so, How i can add compiler option: CMOCK_MEM_DYNAMIC in the project??Thanks.

:cmock: :mockprefix: mock :when_no_prototypes: :warn :enforce_strict_ordering: TRUE :plugins:

:flags: :test: :compile: :*:

mvandervoord commented 1 year ago

If you're using Ceedling to manage your builds, you just need to add the following to your project.yml file:

:defines:
  :test:
    - CMOCK_MEM_DYNAMIC

If you're managing your builds using something else (make, rake, whatever), then you add it to the list of compiler options you're using when you make calls to compile.

roxysosa commented 1 year ago

Thanks , for the help , was very useful.That resolve the problem :)