@@ -28,7 +28,7 @@ int main(void) {
28
28
29
29
res = umfMemoryProviderCreate (provider_ops , & params , & provider );
30
30
if (res != UMF_RESULT_SUCCESS ) {
31
- printf ("Failed to create a memory provider!" );
31
+ printf ("Failed to create a memory provider!\n " );
32
32
return -1 ;
33
33
}
34
34
printf ("OS memory provider created at %p\n" , (void * )provider );
@@ -41,7 +41,7 @@ int main(void) {
41
41
res =
42
42
umfMemoryProviderAlloc (provider , alloc_size , alignment , & ptr_provider );
43
43
if (res != UMF_RESULT_SUCCESS ) {
44
- printf ("Failed to allocate memory from the memory provider!" );
44
+ printf ("Failed to allocate memory from the memory provider!\n " );
45
45
goto memory_provider_destroy ;
46
46
}
47
47
@@ -56,7 +56,7 @@ int main(void) {
56
56
// Free allocated memory
57
57
res = umfMemoryProviderFree (provider , ptr_provider , alloc_size );
58
58
if (res != UMF_RESULT_SUCCESS ) {
59
- printf ("Failed to free memory to the provider!" );
59
+ printf ("Failed to free memory to the provider!\n " );
60
60
goto memory_provider_destroy ;
61
61
}
62
62
printf ("Freed memory at %p\n" , ptr_provider );
@@ -69,18 +69,18 @@ int main(void) {
69
69
70
70
res = umfPoolCreate (pool_ops , provider , pool_params , flags , & pool );
71
71
if (res != UMF_RESULT_SUCCESS ) {
72
- printf ("\nFailed to create a pool!" );
72
+ printf ("Failed to create a pool!\n " );
73
73
goto memory_provider_destroy ;
74
74
}
75
- printf ("\nScalable memory pool created at %p\n" , (void * )pool );
75
+ printf ("Scalable memory pool created at %p\n" , (void * )pool );
76
76
77
77
// Allocate some memory in the pool
78
78
size_t num = 1 ;
79
79
alloc_size = 128 ;
80
80
81
81
char * ptr = umfPoolCalloc (pool , num , alloc_size );
82
82
if (!ptr ) {
83
- printf ("Failed to allocate memory in the pool!" );
83
+ printf ("Failed to allocate memory in the pool!\n " );
84
84
goto memory_pool_destroy ;
85
85
}
86
86
@@ -97,7 +97,7 @@ int main(void) {
97
97
umf_memory_provider_handle_t check_provider ;
98
98
res = umfPoolGetMemoryProvider (pool , & check_provider );
99
99
if (res != UMF_RESULT_SUCCESS ) {
100
- printf ("Failed to retrieve a memory provider for the pool!" );
100
+ printf ("Failed to retrieve a memory provider for the pool!\n " );
101
101
goto memory_pool_destroy ;
102
102
}
103
103
printf ("Pool at %p has been allocated from the provider at %p\n" ,
0 commit comments