5 Replies Latest reply on Dec 1, 2014 12:10 AM by JaWa_2142591

    the return value of cfa_mm_MemFreeBytes can't change after calling cfa_mm_Alloc

    ZhaohuaS_76

      Wiced-Smart-SDK: 2.1.1

      I add some code in hello_sensor_timeout for testing cfa_mm_MemFreeBytes and cfa_mm_Alloc,  but I found the return value of cfa_mm_MemFreeBytes can't change after calling cfa_mm_Alloc.

       

      void hello_sensor_timeout(UINT32 arg)
      {
         UINT8* tmp; 

          ble_trace1("hello_sensor_timeout:%d\n", hello_sensor_timer_count);


          tmp = cfa_mm_Alloc(32);
          ble_trace3("E: Free bytes = 0x%08X, 0x%08X, 0x%08X\n", cfa_mm_MemFreeBytes(), &tmp, tmp);
       
          switch(arg)
          {
              case BLEPROFILE_GENERIC_APP_TIMER:
              {
                  hello_sensor_timer_count++;
              }
              break;
          }
      }