mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion, or from .data.rel to .data.rel.ro. The .rodata section is mapped directly from the on-disk file, which is always a save, while .data.rel.ro is mapped directly when using prelink, which is a save in a lot of cases. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
parent
29a14294fc
commit
8ed98db259
14 changed files with 49 additions and 49 deletions
|
|
@ -87,7 +87,7 @@ static int snd_pcm_plug_info(snd_pcm_t *pcm, snd_pcm_info_t *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static snd_pcm_format_t linear_preferred_formats[] = {
|
||||
static const snd_pcm_format_t linear_preferred_formats[] = {
|
||||
#ifdef SND_LITTLE_ENDIAN
|
||||
SND_PCM_FORMAT_S16_LE,
|
||||
SND_PCM_FORMAT_U16_LE,
|
||||
|
|
@ -176,7 +176,7 @@ static snd_pcm_format_t linear_preferred_formats[] = {
|
|||
#endif
|
||||
|
||||
#ifdef BUILD_PCM_NONLINEAR
|
||||
static snd_pcm_format_t nonlinear_preferred_formats[] = {
|
||||
static const snd_pcm_format_t nonlinear_preferred_formats[] = {
|
||||
#ifdef BUILD_PCM_PLUGIN_MULAW
|
||||
SND_PCM_FORMAT_MU_LAW,
|
||||
#endif
|
||||
|
|
@ -190,7 +190,7 @@ static snd_pcm_format_t nonlinear_preferred_formats[] = {
|
|||
#endif
|
||||
|
||||
#ifdef BUILD_PCM_PLUGIN_LFLOAT
|
||||
static snd_pcm_format_t float_preferred_formats[] = {
|
||||
static const snd_pcm_format_t float_preferred_formats[] = {
|
||||
#ifdef SND_LITTLE_ENDIAN
|
||||
SND_PCM_FORMAT_FLOAT_LE,
|
||||
SND_PCM_FORMAT_FLOAT64_LE,
|
||||
|
|
@ -205,7 +205,7 @@ static snd_pcm_format_t float_preferred_formats[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static char linear_format_widths[32] = {
|
||||
static const char linear_format_widths[32] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 1,
|
||||
0, 1, 0, 1, 0, 0, 0, 1,
|
||||
|
|
@ -615,7 +615,7 @@ static int snd_pcm_plug_insert_plugins(snd_pcm_t *pcm,
|
|||
snd_pcm_plug_params_t *slave)
|
||||
{
|
||||
snd_pcm_plug_t *plug = pcm->private_data;
|
||||
static int (*funcs[])(snd_pcm_t *_pcm, snd_pcm_t **new, snd_pcm_plug_params_t *s, snd_pcm_plug_params_t *d) = {
|
||||
static int (*const funcs[])(snd_pcm_t *_pcm, snd_pcm_t **new, snd_pcm_plug_params_t *s, snd_pcm_plug_params_t *d) = {
|
||||
#ifdef BUILD_PCM_PLUGIN_MMAP_EMUL
|
||||
snd_pcm_plug_change_mmap,
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue