summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/pmalloc.c
AgeCommit message (Expand)AuthorFilesLines
2019-03-18Fix build with newer linux headersDamjan Marion1-1/+2
2019-02-27VPP-1576: fix Coverity issuesDave Barach1-1/+1
2019-02-26Fix vpp crashing when attempting to run in kubernetes PodArtem Belov1-0/+21
2019-02-21physmem: keep physmem VA in 39-bit address space on x86_64Damjan Marion1-3/+9
2019-01-23pmalloc: don't iterate if there is no enough free spaceDamjan Marion1-0/+3
2018-11-28cmake: display warning and continue if dpdk not presentDamjan Marion1-4/+4
2018-11-27pmalloc: correct format_pmalloc_map u32 index overrun bugKingwel Xie1-4/+3
2018-11-15VPP-1474: fix 2x coverity warningsDave Barach1-1/+1
2018-11-10pmalloc: u32 pp->index leads to va address overrunKingwel Xie1-1/+2
2018-11-08physmem: Add physmem map supportMohsin Kazmi1-0/+21
2018-11-07pmalloc: fix shared mappingsDamjan Marion1-2/+4
2018-10-28physmem: coverity issuesDamjan Marion1-3/+4
2018-10-25pmalloc: don't lock 4K pages if we don't have access to pagemapDamjan Marion1-6/+26
2018-10-25pmalloc: support for 4K pagesDamjan Marion1-56/+180
2018-10-24vppinfra: autodetect default hugepage sizeDamjan Marion1-16/+2
2018-10-23physmem coverity issuesDamjan Marion1-2/+3
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-0/+562
m"> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <vppinfra/pool.h> /* can be a very large size */ #define NELTS 1024 int main (int argc, char *argv[]) { u32 *junk = 0; int i; u32 *tp = 0; u32 *indices = 0; clib_mem_init (0, 3ULL << 30); vec_validate (indices, NELTS - 1); _vec_len (indices) = 0; pool_init_fixed (tp, NELTS); for (i = 0; i < NELTS; i++) { pool_get (tp, junk); vec_add1 (indices, junk - tp); *junk = i; } for (i = 0; i < NELTS; i++) { junk = pool_elt_at_index (tp, indices[i]); ASSERT (*junk == i); } fformat (stdout, "%d pool elts before deletes\n", pool_elts (tp)); pool_put_index (tp, indices[12]); pool_put_index (tp, indices[43]); fformat (stdout, "%d pool elts after deletes\n", pool_elts (tp)); pool_validate (tp); pool_free (tp); return 0; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */