• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nasa / trick / 27163446257

08 Jun 2026 08:00PM UTC coverage: 56.142% (-0.8%) from 56.933%
27163446257

push

github

web-flow
ci: Single file CI and style checks (#2125)

* Replace old ci checks with a single file `ci.yml`

* Update Makefile for code-coverage tests

* Add Java style check to ci

* Update Makefile

14685 of 26157 relevant lines covered (56.14%)

463574.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.71
/trick_source/sim_services/MemoryManager/MemoryManager_alloc_info_map.cpp
1
#include "trick/MemoryManager.hh"
2
#include <sstream>
3
#include <string.h>
4

5
ALLOC_INFO* Trick::MemoryManager::get_alloc_info_of( void* addr) {
4,903✔
6

7
    ALLOC_INFO_MAP::iterator pos = alloc_info_map.lower_bound(addr);
4,903✔
8
    if (pos != alloc_info_map.end()) {
4,903✔
9
        ALLOC_INFO* alloc_info = pos->second;
4,706✔
10
        if (( addr >= alloc_info->start) && ( addr <= alloc_info->end)) {
4,706✔
11
            return(alloc_info);
4,705✔
12
        }
13
    }
14
    return NULL;
198✔
15
}
16

17
ALLOC_INFO* Trick::MemoryManager::get_alloc_info_at( void* addr) {
13,438✔
18

19
    ALLOC_INFO_MAP::iterator pos = alloc_info_map.find( addr);
13,438✔
20
    if (pos == alloc_info_map.end()) {
13,438✔
21
        return NULL;
402✔
22
    } else {
23
        return( pos->second);
13,036✔
24
    }
25
}
26

27
int Trick::MemoryManager::set_name_at( void* addr , const char * name ) {
×
28

29
    int ret = 0 ;
×
30

31
    ALLOC_INFO_MAP::iterator pos = alloc_info_map.find( addr);
×
32
    if (pos != alloc_info_map.end()) {
×
33
        pos->second->name = strdup(name) ;
×
34
        pthread_mutex_lock(&mm_mutex);
×
35
        VARIABLE_MAP::iterator variable_pos;
×
36
        variable_pos = variable_map.find(name);
×
37
        if (variable_pos != variable_map.end()) {
×
38
            std::stringstream ss;
×
39
            ss << "Call to set_name_at() failed because a variable named \""
40
               << name << "\" already exists.";
×
41
            emitError(ss.str());
×
42
            pthread_mutex_unlock(&mm_mutex);
×
43
            ret = -1 ;
×
44
        } else {
×
45
            variable_map[name] = pos->second ;
×
46
        }
47
        pthread_mutex_unlock(&mm_mutex);
×
48
    } else {
49
        ret = -1 ;
×
50
    }
51
    return ret ;
×
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc