Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | HB_Pointer | - |
4 | _hb_alloc(size_t size, | - |
5 | HB_Error *perror ) | - |
6 | { | - |
7 | HB_Error error = (HB_Error)0; | - |
8 | HB_Pointer block = ((void *)0); | - |
9 | | - |
10 | if ( size > 0 ) evaluated: size > 0 yes Evaluation Count:402351 | yes Evaluation Count:10041 |
| 10041-402351 |
11 | { | - |
12 | block = calloc( 1, size ); | - |
13 | if ( !block ) partially evaluated: !block no Evaluation Count:0 | yes Evaluation Count:402351 |
| 0-402351 |
14 | error = _hb_err (HB_Err_Out_Of_Memory); never executed: error = _hb_err (HB_Err_Out_Of_Memory); | 0 |
15 | } executed: } Execution Count:402351 | 402351 |
16 | | - |
17 | *perror = error; | - |
18 | return block; executed: return block; Execution Count:412392 | 412392 |
19 | } | - |
20 | | - |
21 | | - |
22 | HB_Pointer | - |
23 | _hb_realloc(HB_Pointer block, | - |
24 | size_t new_size, | - |
25 | HB_Error *perror ) | - |
26 | { | - |
27 | HB_Pointer block2 = ((void *)0); | - |
28 | HB_Error error = (HB_Error)0; | - |
29 | | - |
30 | block2 = realloc( block, new_size ); | - |
31 | if ( block2 == ((void *)0) && new_size != 0 ) partially evaluated: block2 == ((void *)0) no Evaluation Count:0 | yes Evaluation Count:572 |
never evaluated: new_size != 0 | 0-572 |
32 | error = _hb_err (HB_Err_Out_Of_Memory); never executed: error = _hb_err (HB_Err_Out_Of_Memory); | 0 |
33 | | - |
34 | if ( !error ) partially evaluated: !error yes Evaluation Count:572 | no Evaluation Count:0 |
| 0-572 |
35 | block = block2; executed: block = block2; Execution Count:572 | 572 |
36 | | - |
37 | *perror = error; | - |
38 | return block; executed: return block; Execution Count:572 | 572 |
39 | } | - |
40 | | - |
41 | | - |
42 | void | - |
43 | _hb_free( HB_Pointer block ) | - |
44 | { | - |
45 | if ( block ) partially evaluated: block yes Evaluation Count:397495 | no Evaluation Count:0 |
| 0-397495 |
46 | free( block ); executed: free( block ); Execution Count:397495 | 397495 |
47 | } executed: } Execution Count:397495 | 397495 |
48 | | - |
49 | | - |
50 | | - |
51 | HB_Error | - |
52 | _hb_err (HB_Error code) | - |
53 | { | - |
54 | return code; never executed: return code; | 0 |
55 | } | - |
56 | | - |
| | |