DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: 曾懷恩 <the@csie.io>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] segmentation fault after using rte_malloc()
Date: Thu, 18 Apr 2019 19:59:44 -0700	[thread overview]
Message-ID: <20190418195944.04c4cec5@hermes.lan> (raw)
In-Reply-To: <5BDADE86-3D04-4BE5-AC95-03BE123ED42B@csie.io>

On Fri, 19 Apr 2019 09:11:05 +0800
曾懷恩 <the@csie.io> wrote:

> 	Hi all, 
> 
> 	i have 1 problem while using rte_malloc
> 
> 	Every time I use this function and use the memory it returns, it shows segmentation fault(core dump)
> 
> 	Is something wrong?
> 
> 	thanks.
> 
> 
> 	rte init …
> 	………...
> 	unsigned char *str1;
> 	printf("str1 addr = %x\n", str1);
> 	str1 = rte_malloc(NULL,2,RTE_CACHE_LINE_SIZE);
> 	printf("str1 addr = %x\n", str1);
> 	str1[0] = 'a’; //segmentation fault here
> 	str1[1] = '\0';
Do you have huge pages?
Did you do eal_init?

  reply	other threads:[~2019-04-19  2:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  1:11 曾懷恩
2019-04-19  2:59 ` Stephen Hemminger [this message]
2019-04-19  3:31   ` 曾懷恩
2019-04-20 20:29     ` Wiles, Keith
2019-04-22  6:43       ` 曾懷恩
2019-04-22 13:09         ` Wiles, Keith
2019-04-23 17:34           ` 曾懷恩
2019-04-24 14:22             ` 曾懷恩
2019-04-24 14:38               ` Wiles, Keith
2019-04-25  3:55                 ` 曾懷恩
2019-04-25  4:18                   ` Wiles, Keith
2020-07-24  4:07 Logan Von

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190418195944.04c4cec5@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=the@csie.io \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).